mirror of
https://github.com/Floriansylvain/CineAllo.git
synced 2026-08-19 19:53:16 +02:00
🗃️ - DB full init first time it starts w/ docker
This commit is contained in:
+18
-12
@@ -1,13 +1,4 @@
|
||||
services:
|
||||
backend:
|
||||
build: .
|
||||
image: cineallo-backend
|
||||
env_file:
|
||||
- .env
|
||||
networks:
|
||||
- back-net
|
||||
ports:
|
||||
- 3000:3000
|
||||
db:
|
||||
image: mysql:8.0.31
|
||||
env_file:
|
||||
@@ -19,8 +10,23 @@ services:
|
||||
- "MYSQL_DATABASE=${MYSQL_DATABASE}"
|
||||
volumes:
|
||||
- ./mysql-data:/var/lib/mysql
|
||||
# ports:
|
||||
# - 3306:3306
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-f", "http://localhost:3306" ]
|
||||
interval: 5s
|
||||
timeout: 15s
|
||||
retries: 5
|
||||
backend:
|
||||
build: .
|
||||
image: cineallo-backend
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- .env
|
||||
networks:
|
||||
- back-net
|
||||
ports:
|
||||
- "${CINEALLO_PORT}:3000"
|
||||
|
||||
networks:
|
||||
back-net:
|
||||
back-net:
|
||||
|
||||
Reference in New Issue
Block a user