-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
78 lines (76 loc) · 1.57 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
version: '3.3'
services:
mercury_api:
restart: always
image: mercury_api:latest
networks:
- mercury_api
build:
context: .
dockerfile: ./Dockerfile
target: api
env_file:
- .env
ports:
- "8000:8000"
depends_on:
- mercury_cache
- mercury_db
- mercury_migrate
mercury_cache:
image: redis:6.2.6
restart: always
container_name: mercury_cache
networks:
- mercury_api
mercury_migrate:
image: flyway/flyway:7.15.0
container_name: mercury_migrate
command: -mixed=true -url="jdbc:postgresql://${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}" -user="${POSTGRES_USER}" -password="${POSTGRES_PASSWORD}" migrate
volumes:
- ./src/migrations:/flyway/sql
env_file:
- .env
depends_on:
- mercury_db
networks:
- mercury_api
mercury_db:
image: postgres:13
container_name: mercury_db
ports:
- 5432:5432
restart: always
volumes:
- mercurydb:/var/lib/postgresql/data
env_file:
- .env
networks:
- mercury_api
mercury_integration_tests:
build:
context: .
dockerfile: ./Dockerfile
target: integration_tests
env_file:
- .env
mercury_unit_tests:
build:
context: .
dockerfile: ./Dockerfile
target: unit_tests
env_file:
- .env
mercury_linter:
image: cwcloud-linter:latest
build:
context: .
dockerfile: ./Dockerfile
target: linter
env_file:
- .env
volumes:
mercurydb:
networks:
mercury_api:
driver: bridge