Merge pull request #1944 from innerfly/fix/pwd-yml-configurator-dependency
fix(pwd.yml): add configurator dependency to backend services; check for existing site before creation
This commit is contained in:
commit
c801ecea16
22
pwd.yml
22
pwd.yml
|
|
@ -14,6 +14,9 @@ services:
|
|||
DB_PORT: "3306"
|
||||
MYSQL_ROOT_PASSWORD: admin
|
||||
MARIADB_ROOT_PASSWORD: admin
|
||||
depends_on:
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
|
||||
configurator:
|
||||
image: frappe/erpnext:v16.29.0
|
||||
|
|
@ -75,7 +78,11 @@ services:
|
|||
fi
|
||||
done;
|
||||
echo "sites/common_site_config.json found";
|
||||
bench new-site --mariadb-user-host-login-scope='%' --admin-password=admin --db-root-username=root --db-root-password=admin --install-app erpnext --set-default frontend;
|
||||
if [ -d "sites/frontend" ]; then
|
||||
echo "Site frontend already exists, skipping creation";
|
||||
else
|
||||
bench new-site --mariadb-user-host-login-scope='%' --admin-password=admin --db-root-username=root --db-root-password=admin --install-app erpnext --set-default frontend;
|
||||
fi;
|
||||
|
||||
db:
|
||||
image: mariadb:11.8
|
||||
|
|
@ -106,6 +113,7 @@ services:
|
|||
- frappe_network
|
||||
depends_on:
|
||||
- websocket
|
||||
- backend
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
|
@ -144,6 +152,9 @@ services:
|
|||
environment:
|
||||
FRAPPE_REDIS_CACHE: redis://redis-cache:6379
|
||||
FRAPPE_REDIS_QUEUE: redis://redis-queue:6379
|
||||
depends_on:
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
|
||||
queue-short:
|
||||
image: frappe/erpnext:v16.29.0
|
||||
|
|
@ -163,6 +174,9 @@ services:
|
|||
environment:
|
||||
FRAPPE_REDIS_CACHE: redis://redis-cache:6379
|
||||
FRAPPE_REDIS_QUEUE: redis://redis-queue:6379
|
||||
depends_on:
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
|
||||
redis-queue:
|
||||
image: redis:6.2-alpine
|
||||
|
|
@ -195,6 +209,9 @@ services:
|
|||
volumes:
|
||||
- sites:/home/frappe/frappe-bench/sites
|
||||
- logs:/home/frappe/frappe-bench/logs
|
||||
depends_on:
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
|
||||
websocket:
|
||||
image: frappe/erpnext:v16.29.0
|
||||
|
|
@ -212,6 +229,9 @@ services:
|
|||
volumes:
|
||||
- sites:/home/frappe/frappe-bench/sites
|
||||
- logs:/home/frappe/frappe-bench/logs
|
||||
depends_on:
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
|
|
|
|||
Loading…
Reference in New Issue