-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (64 loc) · 1.38 KB
/
docker-compose.yml
File metadata and controls
68 lines (64 loc) · 1.38 KB
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
services:
api_main:
container_name: api_main
depends_on:
postgres_host:
condition: service_healthy
build:
context: ./
dockerfile: Dockerfile
env_file:
- .env
ports:
- 3000:3000
networks:
- webnet
restart: always
postgres_host:
container_name: postgres_host
image: postgres:latest
restart: always
command: postgres -c 'max_connections=500'
volumes:
- ./.volumes/postgres/db-data:/var/lib/postgresql/data
- ./.volumes/postgres/db:/docker-entrypoint-initdb.d/
ports:
- 5432:5432
expose:
- 5432
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_EXTENSIONS: citext,uuid-ossp
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d ${DB_NAME}" ]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
networks:
- webnet
api_main_migrations:
container_name: api_main_migrations
depends_on:
postgres_host:
condition: service_healthy
build:
context: ./
dockerfile: Dockerfile.migrations
env_file:
- .env
networks:
- webnet
restart: no
redis_host:
container_name: redis_host
image: redis:5
restart: always
ports:
- 6379:6379
networks:
- webnet
networks:
webnet:
driver: bridge