-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
63 lines (57 loc) · 1.45 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
version: '2.1'
services:
db:
image: mysql:5.7.32
container_name: db
restart: always
volumes:
- .storage/mysql_data:/var/lib/mysql
environment:
MYSQL_DATABASE: my_database
MYSQL_USER: my_user
MYSQL_PASSWORD: my_password
MYSQL_ROOT_PASSWORD: my_password
command: mysqld --ignore-db-dir=lost+found --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb-buffer-pool-size=1G --max-allowed-packet=1G --wait-timeout=28800
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
retries: 10
ports:
- 3306:3306
api:
build:
context: .
dockerfile: ./Dockerfile
image: ssi-registry.teda.th/ssi/web-portal-api/staging:latest
container_name: api
restart: always
volumes:
- .:/app
- .env:/.env
ports:
- 8085:8081
environment:
- APP_SERVICE=WEB
depends_on:
- db
migration:
build:
context: .
dockerfile: migrate.Dockerfile
image: ssi-registry.teda.th/ssi/web-portal-api/staging-migrate:latest
volumes:
- .env:/app/.env
depends_on:
- db
seed:
build:
context: .
dockerfile: seed.Dockerfile
image: ssi-registry.teda.th/ssi/web-portal-api/staging-seed:latest
volumes:
- .env:/app/.env
depends_on:
- db
networks:
default:
name: dev_network