-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-prod.yml
More file actions
51 lines (47 loc) · 1.16 KB
/
docker-compose-prod.yml
File metadata and controls
51 lines (47 loc) · 1.16 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
# NOTE: For running as production only...
version: '3.8'
services:
# API App
node_app:
image: node:20.13.1
command: >
bash -c "
cd app &&
chmod +x migration-helper.sh &&
npm install &&
npm install -g typescript &&
sleep ${MIGRATION_DELAY_SECONDS} &&
./migration-helper.sh &&
npm run build &&
npm run preview
"
environment:
POSTGRES_USER: ${POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_MAIN_DB}
ports:
- "${API_PORT}:3000"
volumes:
- ./src:/app/src
- ./:/app
depends_on:
- postgres_db
# database
postgres_db:
image: postgres:14.12
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_MAIN_DB}
volumes:
- ./pgdata:/var/lib/postgresql/data:z
# database dashboard
pgadmin:
image: dpage/pgadmin4:8.6
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
ports:
- "${PGADMIN_PORT}:80"