|
@@ -4,6 +4,11 @@ services:
|
|
|
image: mysql:8.0.19
|
|
image: mysql:8.0.19
|
|
|
command: '--default-authentication-plugin=mysql_native_password'
|
|
command: '--default-authentication-plugin=mysql_native_password'
|
|
|
restart: always
|
|
restart: always
|
|
|
|
|
+ healthcheck:
|
|
|
|
|
+ test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent"]
|
|
|
|
|
+ interval: 3s
|
|
|
|
|
+ retries: 5
|
|
|
|
|
+ start_period: 30s
|
|
|
secrets:
|
|
secrets:
|
|
|
- db-password
|
|
- db-password
|
|
|
volumes:
|
|
volumes:
|
|
@@ -26,11 +31,16 @@ services:
|
|
|
networks:
|
|
networks:
|
|
|
- backnet
|
|
- backnet
|
|
|
- frontnet
|
|
- frontnet
|
|
|
|
|
+ depends_on:
|
|
|
|
|
+ db:
|
|
|
|
|
+ condition: service_healthy
|
|
|
proxy:
|
|
proxy:
|
|
|
build: proxy
|
|
build: proxy
|
|
|
restart: always
|
|
restart: always
|
|
|
ports:
|
|
ports:
|
|
|
- 80:80
|
|
- 80:80
|
|
|
|
|
+ depends_on:
|
|
|
|
|
+ - backend
|
|
|
networks:
|
|
networks:
|
|
|
- frontnet
|
|
- frontnet
|
|
|
volumes:
|
|
volumes:
|