-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
58 lines (54 loc) · 1.53 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
version: '3'
services:
realworld-backend-app:
container_name: realworld-backend-app
build:
context: .
dockerfile: ./Dockerfile
environment:
NODE_ENV: development
PORT: ${APP_PORT}
JWT_SECRET: ${JWT_SECRET}
DB_HOST: db-server
DB_PORT: 5432
DB_NAME: ${DB_NAME}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
ports:
- ${APP_PORT}:${APP_PORT}
depends_on:
- postgres
links:
- postgres:db-server
postgres:
image: postgres:13.1
container_name: postgres
restart: always
environment:
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_DB: ${DB_NAME}
POSTGRES_PASSWORD: '${DB_PASSWORD}'
volumes:
- db-data:/var/lib/postgresql/data
- ./src/db/migrations/dbinit.sql:/docker-entrypoint-initdb.d/dbinit.sql
ports:
- ${DB_PORT}:5432
pgadmin:
image: dpage/pgadmin4:4.28
container_name: pgadmin
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: '${PGADMIN_EMAIL}'
PGADMIN_DEFAULT_PASSWORD: '${PGADMIN_PASSWORD}'
PGADMIN_LISTEN_PORT: 80
ports:
- ${PGADMIN_PORT}:80
volumes:
- pgadmin-data:/var/lib/pgadmin
depends_on:
- postgres
links:
- postgres:db-server
volumes:
db-data:
pgadmin-data: