-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (45 loc) · 903 Bytes
/
docker-compose.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
46
47
48
49
version: '3.8'
services:
db:
image: mysql
restart: always
environment:
MYSQL_USER: film
MYSQL_PASSWORD: film
MYSQL_DATABASE: films
MYSQL_ROOT_PASSWORD: 1234
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 15s
timeout: 10s
retries: 3
ports:
- "3306:3306"
networks:
- api-network
volumes:
- db:/var/lib/mysql
films-api:
image: films-api
restart: always
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
environment:
DB_HOST: db
DB_USER: film
DB_PASSWORD: film
DB_NAME: films
DB_PORT: 3306
JWT_SECRET: df83hjfr8sj39gtyuhw93fc598mn7
HASH_PEPPER: secret-random.string
networks:
- api-network
volumes:
db:
driver: local
networks:
api-network:
driver: bridge