-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (65 loc) · 1.74 KB
/
docker-compose.yml
File metadata and controls
68 lines (65 loc) · 1.74 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:
db:
container_name: ${SPENNY_DB_CONTAINER_NAME}
image: ${SPENNY_DB_IMAGE_NAME}
hostname: ${SPENNY_DB_HOST}
# volumes:
# - ${SPENNY_DB_SQL_DUMP_FILE_PATH}:/docker-entrypoint-initdb.d/init.sql
# - /home/hcheong/projects/spenny/utils/test_spenny_db.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- ${SPENNY_DB_PORT}:5432
environment:
- POSTGRES_USER=${SPENNY_DB_USER}
- POSTGRES_PASSWORD=${SPENNY_DB_PASS}
- POSTGRES_DB=${SPENNY_DB_NAME}
- TZ=${SPENNY_DB_TIMEZONE}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
retries: 5
start_period: 10s
timeout: 5s
profiles:
- test
- demo
backend:
container_name: ${BACKEND_CONTAINER_NAME}
image: ${BACKEND_IMAGE_NAME}
build:
context: ./backend
dockerfile: Dockerfile
ports:
- ${BACKEND_PORT}:8000
depends_on:
db:
condition: service_healthy
environment:
- SPENNY_DB_USER=${SPENNY_DB_USER}
- SPENNY_DB_PASS=${SPENNY_DB_PASS}
- SPENNY_DB_NAME=${SPENNY_DB_NAME}
- SPENNY_DB_HOST=${SPENNY_DB_HOST}
- SPENNY_DB_PORT=${SPENNY_DB_PORT}
- TZ=${SPENNY_DB_TIMEZONE}
volumes:
- ${BACKEND_APP_PATH}/app:/app
profiles:
- demo
- live
frontend:
container_name: ${FRONTEND_CONTAINER_NAME}
image: ${FRONTEND_IMAGE_NAME}
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- ${FRONTEND_PORT}:5173
environment:
- PROJECT_NAME=${PROJECT_NAME}
- BACKEND_CONTAINER_URL=${BACKEND_CONTAINER_URL}
- TZ=${FRONTEND_TIMEZONE}
volumes:
- ${FRONTEND_APP_PATH}:/app
profiles:
- demo
- live