attempt 2
This commit is contained in:
parent
45c07acf0b
commit
afa9601a2f
31
compose.yml
31
compose.yml
|
@ -5,8 +5,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- "site_content:/var/www/html/"
|
- "site_content:/var/www/html/"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- internal
|
||||||
- proxy
|
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=db
|
- DB_HOST=db
|
||||||
- DB_USER=site
|
- DB_USER=site
|
||||||
|
@ -18,10 +17,10 @@ services:
|
||||||
configs:
|
configs:
|
||||||
- source: php_uploads_conf
|
- source: php_uploads_conf
|
||||||
target: /usr/local/etc/php/conf.d/uploads.ini
|
target: /usr/local/etc/php/conf.d/uploads.ini
|
||||||
- source: entrypoint_conf
|
# - source: entrypoint_conf
|
||||||
target: /docker-entrypoint.sh
|
# target: /docker-entrypoint.sh
|
||||||
mode: 0555
|
# mode: 0555
|
||||||
entrypoint: /docker-entrypoint.sh
|
# entrypoint: /docker-entrypoint.sh
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
deploy:
|
deploy:
|
||||||
|
@ -33,7 +32,10 @@ services:
|
||||||
frontend:
|
frontend:
|
||||||
image: nginx:1.19.2
|
image: nginx:1.19.2
|
||||||
networks:
|
networks:
|
||||||
|
- internal
|
||||||
- proxy
|
- proxy
|
||||||
|
depends_on:
|
||||||
|
- backend
|
||||||
deploy:
|
deploy:
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
|
@ -53,18 +55,18 @@ services:
|
||||||
configs:
|
configs:
|
||||||
- source: nginx_default_conf
|
- source: nginx_default_conf
|
||||||
target: /etc/nginx/conf.d/default.conf
|
target: /etc/nginx/conf.d/default.conf
|
||||||
healthcheck:
|
# healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost"]
|
# test: ["CMD", "curl", "-f", "http://localhost"]
|
||||||
interval: 30s
|
# interval: 30s
|
||||||
timeout: 10s
|
# timeout: 10s
|
||||||
retries: 10
|
# retries: 10
|
||||||
start_period: 1m
|
# start_period: 1m
|
||||||
db:
|
db:
|
||||||
image: "mariadb:10.6"
|
image: "mariadb:10.6"
|
||||||
volumes:
|
volumes:
|
||||||
- "mariadb:/var/lib/mysql"
|
- "mariadb:/var/lib/mysql"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- internal
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
|
||||||
- MYSQL_DATABASE=site
|
- MYSQL_DATABASE=site
|
||||||
|
@ -76,7 +78,8 @@ services:
|
||||||
deploy:
|
deploy:
|
||||||
labels: ['coop-cloud.${STACK_NAME}.db.version=10.6-718cb856']
|
labels: ['coop-cloud.${STACK_NAME}.db.version=10.6-718cb856']
|
||||||
networks:
|
networks:
|
||||||
backend:
|
internal:
|
||||||
|
internal: true
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
volumes:
|
volumes:
|
||||||
|
|
Loading…
Reference in New Issue