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"
|
DB_PORT: "3306"
|
||||||
MYSQL_ROOT_PASSWORD: admin
|
MYSQL_ROOT_PASSWORD: admin
|
||||||
MARIADB_ROOT_PASSWORD: admin
|
MARIADB_ROOT_PASSWORD: admin
|
||||||
|
depends_on:
|
||||||
|
configurator:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
|
||||||
configurator:
|
configurator:
|
||||||
image: frappe/erpnext:v16.29.0
|
image: frappe/erpnext:v16.29.0
|
||||||
|
|
@ -75,7 +78,11 @@ services:
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
echo "sites/common_site_config.json found";
|
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:
|
db:
|
||||||
image: mariadb:11.8
|
image: mariadb:11.8
|
||||||
|
|
@ -106,6 +113,7 @@ services:
|
||||||
- frappe_network
|
- frappe_network
|
||||||
depends_on:
|
depends_on:
|
||||||
- websocket
|
- websocket
|
||||||
|
- backend
|
||||||
deploy:
|
deploy:
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
|
|
@ -144,6 +152,9 @@ services:
|
||||||
environment:
|
environment:
|
||||||
FRAPPE_REDIS_CACHE: redis://redis-cache:6379
|
FRAPPE_REDIS_CACHE: redis://redis-cache:6379
|
||||||
FRAPPE_REDIS_QUEUE: redis://redis-queue:6379
|
FRAPPE_REDIS_QUEUE: redis://redis-queue:6379
|
||||||
|
depends_on:
|
||||||
|
configurator:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
|
||||||
queue-short:
|
queue-short:
|
||||||
image: frappe/erpnext:v16.29.0
|
image: frappe/erpnext:v16.29.0
|
||||||
|
|
@ -163,6 +174,9 @@ services:
|
||||||
environment:
|
environment:
|
||||||
FRAPPE_REDIS_CACHE: redis://redis-cache:6379
|
FRAPPE_REDIS_CACHE: redis://redis-cache:6379
|
||||||
FRAPPE_REDIS_QUEUE: redis://redis-queue:6379
|
FRAPPE_REDIS_QUEUE: redis://redis-queue:6379
|
||||||
|
depends_on:
|
||||||
|
configurator:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
|
||||||
redis-queue:
|
redis-queue:
|
||||||
image: redis:6.2-alpine
|
image: redis:6.2-alpine
|
||||||
|
|
@ -195,6 +209,9 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
- sites:/home/frappe/frappe-bench/sites
|
||||||
- logs:/home/frappe/frappe-bench/logs
|
- logs:/home/frappe/frappe-bench/logs
|
||||||
|
depends_on:
|
||||||
|
configurator:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
|
||||||
websocket:
|
websocket:
|
||||||
image: frappe/erpnext:v16.29.0
|
image: frappe/erpnext:v16.29.0
|
||||||
|
|
@ -212,6 +229,9 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
- sites:/home/frappe/frappe-bench/sites
|
||||||
- logs:/home/frappe/frappe-bench/logs
|
- logs:/home/frappe/frappe-bench/logs
|
||||||
|
depends_on:
|
||||||
|
configurator:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db-data:
|
db-data:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue