-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
97 lines (90 loc) · 1.97 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: '3.8'
services:
db:
image: postgres:13
container_name: skillkit_db
env_file: .env
environment:
POSTGRES_DB: ${DB_NAME:-postgres}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASS:-postgres}
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- '${DB_PORT:-5432}:5432'
volumes:
- db-data:/var/lib/postgresql/data
networks:
- skillkit_network
restart: unless-stopped
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-postgres}']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
pgadmin:
container_name: skillkit_pgadmin
image: dpage/pgadmin4
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: '${PGADMIN_DEFAULT_EMAIL}'
PGADMIN_DEFAULT_PASSWORD: '${PGADMIN_DEFAULT_PASSWORD}'
ports:
- '${PGADMIN_PORT}:80'
networks:
- skillkit_network
depends_on:
- db
links:
- db
dev:
build:
context: .
target: dependencies
container_name: skillkit_backend_dev
env_file: .env
expose:
- '${PORT:-8000}'
ports:
- '${PORT:-8000}:${PORT:-8000}'
- '9229:9229'
depends_on:
- db
- mailhog
networks:
- skillkit_network
restart: unless-stopped
command: yarn dev
volumes:
- .:/app:rw
- /app/node_modules
prod:
build:
context: .
target: runner
container_name: skillkit_backend_prod
env_file: .env
expose:
- '${PORT:-8000}'
ports:
- '${PORT:-8000}:${PORT:-8000}'
depends_on:
- db
- pgadmin
restart: unless-stopped
networks:
- skillkit_network
mailhog:
container_name: skillkit_maildev
image: mailhog/mailhog:latest
tty: true
ports:
- "1025:1025"
- "8025:8025"
networks:
- skillkit_network
networks:
skillkit_network:
name: skillkit_network
volumes:
db-data: