-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
45 lines (42 loc) · 1.07 KB
/
docker-compose.dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: '3.9'
services:
api:
build:
context: ./
dockerfile: ./Dockerfile.dev
command: /bin/bash -c "while sleep 1000; do :; done"
container_name: api_challenge
working_dir: /server
env_file:
- .env
ports:
- 5050:5050
networks:
- app-network
volumes:
# Nous allons préciser le dossier local
- .:/server:cached
database:
image: mariadb
restart: always
container_name: database_challenge
ports:
- "3309:3306"
env_file:
- .env
command: [
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci",
]
volumes:
- ./database/dbms-data:/var/lib/mysql
- ./database/mariadb.cnf:/etc/mysql/mariadb.cnf
# Pointer vers un dossier qui aura des scripts d'initialisation de notre base
- ./database/dev-initdb.d:/docker-entrypoint-initdb.d
# Ajouter le DDL qui va tourner en dernier
- ./database/ddl/ddl.sql:/docker-entrypoint-initdb.d/990-ddl.sql
networks:
- app-network
networks:
app-network:
driver: bridge