-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
81 lines (75 loc) · 1.72 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
version: '3.8'
services:
postgres:
image: postgres:14.2-alpine
restart: always
container_name: postgres
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
PGDATA: /var/lib/postgresql/data
ports:
- "${DB_PORT}:5432"
volumes:
- pg_data:/var/lib/postgresql/data/
# - ./docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
networks:
- bp-network
env_file:
- .env
backend:
restart: always
container_name: backend
build:
dockerfile: Dockerfile
context: './backend'
depends_on:
- postgres
volumes:
- ./backend:/svr/app
- /svr/app/node_modules
ports:
- '${PORT}:3003'
env_file: .env
networks:
- bp-network
frontend:
restart: always
container_name: frontend
build:
dockerfile: Dockerfile
context: "./frontend"
# depends_on:
# - backend # todo: might not be necessary
volumes:
- ./frontend:/usr/app
- /usr/app/node_modules
ports:
- "5173:5173"
env_file: .env
networks:
- bp-network
pgadmin-portal:
image: dpage/pgadmin4
restart: always
container_name: pgadmin-portal
env_file:
- ./backend/.env
environment:
PGADMIN_DEFAULT_PASSWORD: "${PGADMIN_DEFAULT_PASSWORD}"
PGADMIN_DEFAULT_EMAIL: "${PGADMIN_DEFAULT_EMAIL}"
volumes:
- pgadmin:/root/.pgadmin
ports:
- "5055:80"
depends_on:
- postgres
networks:
- bp-network
volumes:
pg_data:
pgadmin:
networks:
bp-network:
driver: bridge