2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-14 00:54:07 +00:00
Commit Graph

1170 Commits

Author SHA1 Message Date
Revant Nandgaonkar
03321a3b2d
Merge pull request #199 from frappe/ddavidebor-travis-badge
Add travis badge
2020-04-19 11:56:06 +05:30
Davide Bortolami
5a66c1d5d0
Add travis badge 2020-04-19 01:18:21 +01:00
Revant Nandgaonkar
6124319ba1
Merge pull request #197 from fermiumlabs/develop
Development environment improvements
2020-04-18 00:56:55 +05:30
Davide Bortolami
8397499e85 Fixes 2020-04-17 20:15:11 +01:00
Davide Bortolami
ac85e36311 Typo 2020-04-17 18:59:10 +01:00
Revant Nandgaonkar
c54d29fd62
Merge pull request #194 from frappe/develop
ERPNext v12.7.0 and Frappe v12.5.0
2020-04-17 13:00:54 +05:30
Davide Bortolami
5f823fe37c doc jupyter updates 2020-04-17 03:26:16 +01:00
Davide Bortolami
85a824753b Improve documentation, including new instructions for jupyterlab 2020-04-17 02:57:20 +01:00
Davide Bortolami
5f3c4df4ad automatically install python extension 2020-04-17 02:56:30 +01:00
Davide Bortolami
87e0648c3d Merge commit '78b2db1af10c0f94a50395f06f6021934921fe17' into develop 2020-04-17 00:34:42 +01:00
Davide Bortolami
2e0a863ef7 Update documentation, add ssh-client to bench build, expose MariaDB port in development 2020-04-17 00:34:22 +01:00
Revant Nandgaonkar
78b2db1af1
Merge pull request #187 from girip11/develop
Support for reading Mariadb and Admin password from file when using d…
2020-04-16 22:59:15 +05:30
girish pasupathy
7498d5439a Support for reading Mariadb and Admin password from file when using docker secrets
With this PR, password can be read from docker secrets in both compose as well as swarm environment.

```YAML

secrets:
  mariadb-root-password:
    file: mariadb-root-password.txt
  erpnext-admin-password:
    file: erpnext-admin-password.txt

services:
  erpnext:
    image: frappe/erpnext-worker:${ERPNEXT_VERSION:-v12.5.2}
    environment:
      - SITE_NAME=example.com
      - DB_ROOT_USER=root
      - MARIADB_HOST=mariadb
      - INSTALL_APPS=erpnext
      - FORCE=1
      - REDIS_CACHE=redis-cache:6379
      - REDIS_QUEUE=redis-queue:6379
      - REDIS_SOCKETIO=redis-socketio:6379
      - SOCKETIO_PORT=9000
      - AUTO_MIGRATE=1
      - ADMIN_PASSWORD_FILE=/run/secrets/erpnext-admin-password
      - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mariadb-root-password
    secrets:
      - erpnext-admin-password
      - mariadb-root-password
    restart: on-failure
    volumes:
      - erpnext-data:/home/frappe/frappe-bench/sites
      - assets-data:/home/frappe/frappe-bench/sites/assets
    links:
      - redis-cache
      - redis-queue
      - redis-socketio
      - mariadb
    depends_on:
      - mariadb
      - redis-cache
      - redis-queue
      - redis-socketio
    networks:
      - erpnext-net
```

Reference: [Addind docker secrets in to your images](https://docs.docker.com/engine/swarm/secrets/#build-support-for-docker-secrets-into-your-images)

Changes to be committed:
	modified:   ../../README.md
	modified:   ../common/commands/new.py
	modified:   ../common/commands/restore_backup.py
	modified:   ../erpnext-nginx/docker-entrypoint.sh
2020-04-16 11:49:40 +05:30
Tim Bolender
3772d580cc Remove obsolete instruction 2020-04-14 17:40:54 +02:00
Tim Bolender
6fb8f2d654 Do not use file system volume for sites 2020-04-14 17:23:27 +02:00
Revant Nandgaonkar
b554c37148
Merge pull request #185 from revant/fix-readme
fix: improve readme
2020-04-10 14:27:37 +05:30
Revant Nandgaonkar
362075a2bc fix: improve readme
mention to add site for production deployment
mention to start bench for development deployment

fixes #181
2020-04-10 14:26:00 +05:30
Revant Nandgaonkar
1b6ede5e89
Merge pull request #184 from girip11/develop
Changed X-Frappe-Site-Name header to use value from `$host` instead o…
2020-04-10 12:00:00 +05:30
girish pasupathy
87c251a464 Changed X-Frappe-Site-Name header to use value from $host instead of $http_host in nginx configuration
ISSUE
-----
`$http_host` is used for setting header 'X-Frappe-Site-Name'
which adds port number to the header along with the host value. Frappe source app.py expects the header
value to contain only the host name and not the port number. So `$host` should be used instead of
`$http_host` to set the 'X-Frappe-Site-Name' header

`$http_host` vs `$host` in nginx
--------------------------------
`$http_host` contains the host name along with port number whereas `$host` contains only the host name in lowercase without the port number.

> `$host` - This variable is equal to line Host in the header of request or
> name of the server processing the request if the Host header is not available.
> This variable may have a different value from $http_host in such cases:
> * when the Host input header is absent or has an empty value,
> `$host` equals to the value of server_name directive;
> * when the value of Host contains port number, `$host` doesn't include
> that port number. $host's value is always lowercase since 0.8.17.
> - [$host vs $http_host stackoverflow](https://stackoverflow.com/questions/15414810/whats-the-difference-of-host-and-http-host-in-nginx)

From the frappe source file [app.py](https://github.com/frappe/frappe/blob/develop/frappe/app.py#L107), X-Frappe-Site-Name is used if its set.

```Python
site = _site or request.headers.get('X-Frappe-Site-Name') or get_site_name(request.host)
```

Since `$host` variable will never contain port number which is not the case with `$http_host`,
`$host` should be used for setting the header 'X-Frappe-Site-Name'. Otherwise we have issues with site serving.

Tested the above changes in compose as well as in swarm environment.
In compose, tested the site with host mapping of 80 and 8000. Works with both the host port mapping.

Tested with erpnext version - v12.5.2

Changes to be committed:
	modified:   build/common/nginx-default.conf.template
2020-04-09 18:58:34 +05:30
Davide Bortolami
bddf592216
Merge pull request #180 from revant/backup-docs-readme
docs: add info about backup command in readme
2020-03-30 12:34:39 +01:00
Revant Nandgaonkar
830d3959b7 docs: add info about backup command in readme 2020-03-30 13:08:55 +05:30
Davide Bortolami
64d03c85c9 fix stale issues messages 2020-03-29 22:45:34 +01:00
Davide Bortolami
80fdb213d8 Add PR template, issue templates 2020-03-29 22:34:39 +01:00
Revant Nandgaonkar
78c25ef277
Merge pull request #175 from frappe/develop
feat: cloud backup and restore
2020-03-27 20:49:45 +05:30
Revant Nandgaonkar
d2216100a3
Merge pull request #174 from revant/backup-restore
feat: cloud backup and restore
2020-03-27 16:43:16 +05:30
Revant Nandgaonkar
2422fbad26 fix: backup and restore
create backup dir in worker images
set ownership and mount volume for backups
update readme about restore backup
2020-03-27 16:41:32 +05:30
Revant Nandgaonkar
4e7b7690ee fix: backup and restore
new command FORCE=1 error fixed
only push backups if exists
prepare and process db restore
2020-03-27 16:07:12 +05:30
Revant Nandgaonkar
3a6f7e1934 feat: resotre backups from volume or cloud 2020-03-27 00:28:50 +05:30
Revant Nandgaonkar
754ba8a91a feat: restrict backups to backup limit for each site 2020-03-25 22:25:24 +05:30
Revant Nandgaonkar
03baa31104
Merge pull request #169 from frappe/ddavidebor-patch-1
Create stale.yml
2020-03-25 19:17:08 +05:30
Revant Nandgaonkar
7e1d69456d
Merge pull request #170 from frappe/ddavidebor-patch-2
Create greetings.yml
2020-03-25 19:16:52 +05:30
Revant Nandgaonkar
5f187c4e3f feat: worker command to push backups to cloud 2020-03-25 06:35:49 +05:30
Davide Bortolami
dbd172efc5
Create greetings.yml
Adds greeting for first time user interacts with the repo
2020-03-24 17:15:27 +00:00
Davide Bortolami
ebd9d877d9
Create stale.yml 2020-03-24 17:09:09 +00:00
Davide Bortolami
989a55ffe0
Merge pull request #168 from fermiumlabs/update-documentation
Add contributing.md by github standards
2020-03-24 17:02:02 +00:00
Davide Bortolami
d64662d7da fixed 2020-03-24 17:01:33 +00:00
Davide Bortolami
55641c07de Add contributing.md by github standards 2020-03-24 15:00:46 +00:00
Revant Nandgaonkar
eacd2c95b1
Merge pull request #165 from frappe/develop
fix: do not auto migrate on first run
2020-03-22 22:49:57 +05:30
Revant Nandgaonkar
c59d7aef65
Merge pull request #164 from revant/fix-auto-migrate
fix: do not auto migrate on first run
2020-03-22 19:10:00 +05:30
Revant Nandgaonkar
14dc20d510 fix: do not auto migrate on first run 2020-03-22 19:08:41 +05:30
Revant Nandgaonkar
c38f9a49c4
Merge pull request #163 from frappe/develop
chore: build latest images for Frappe and ERPNext
2020-03-21 18:59:02 +05:30
Revant Nandgaonkar
01027023cf
Merge pull request #162 from revant/feat-auto-migrate
feat: auto migrate
2020-03-21 15:59:29 +05:30
Revant Nandgaonkar
674c766480 feat: auto migrate on container start if AUTO_MIGRATE set 2020-03-21 15:47:35 +05:30
Revant Nandgaonkar
7c356ccb27 fix: make python commands modular and reusable 2020-03-20 20:56:23 +05:30
Revant Nandgaonkar
8ce9d4214d
Merge pull request #161 from revant/fix-160
fix(frappe-nginx): fix missing /rsync
2020-03-20 05:22:46 +05:30
Revant Nandgaonkar
f1393c3a94 fix(frappe-nginx): fix missing /rsync
fixes #160
2020-03-20 05:21:30 +05:30
Revant Nandgaonkar
a862855407
Merge pull request #158 from frappe/develop
fix(frappe-worker): set sites volume ownership
2020-03-17 22:51:22 +05:30
Revant Nandgaonkar
0c5ea6d51a
Merge pull request #157 from revant/fix-sites-vol-permission
fix(frappe-worker): set sites volume ownership
2020-03-17 22:33:09 +05:30
Revant Nandgaonkar
8475af3785 fix(frappe-worker): set sites volume ownership 2020-03-17 22:31:37 +05:30
Revant Nandgaonkar
60fb663423
Merge pull request #155 from frappe/develop
fix: erpnext-nginx image Dockerfile(s)
2020-03-17 00:17:48 +05:30