-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (49 loc) · 1.22 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
# HostName/ServiceName/ResourceName format: small-steps-api-<BUILD_ENV>-<service/resource>
version: '3.2'
services:
api:
build: api/
entrypoint: ./entrypoints/api.${BUILD_ENV}.sh
image: small-steps-api-${BUILD_ENV}:${TAG}
hostname: small-steps-api-${BUILD_ENV}-api
container_name: small-steps-api-${BUILD_ENV}-api
env_file:
- .env.${BUILD_ENV}
depends_on:
- db
- run_migrations
ports:
- "8000:8000"
restart: unless-stopped
volumes:
- type: bind
source: ./api/
target: /home/appuser/api/
networks:
- backend
db:
image: postgres:11.3
hostname: small-steps-api-${BUILD_ENV}-db
container_name: small-steps-api-${BUILD_ENV}-db
ports:
- "5432:5432"
networks:
- backend
run_migrations:
build: api
image: small-steps-api-${BUILD_ENV}:${TAG}
entrypoint: ./entrypoints/run_migrations.sh
container_name: small-steps-api-${BUILD_ENV}-run_migrations
env_file:
- .env.${BUILD_ENV}
volumes:
- type: bind
source: ./api/
target: /home/appuser/api/
networks:
- backend
depends_on:
- db
networks:
backend:
name: small-steps-api-${BUILD_ENV}-network