-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (55 loc) · 1.31 KB
/
docker-compose.yml
File metadata and controls
59 lines (55 loc) · 1.31 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
services:
# PostgreSQL Database
database:
image: postgres:15-alpine
container_name: biggs-permit-db
environment:
POSTGRES_DB: biggs_permit
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_INITDB_ARGS: "--auth-host=scram-sha-256"
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- biggs-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d biggs_permit"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# Main Application
app:
build:
context: .
dockerfile: Dockerfile
container_name: biggs-permit-app
ports:
- "3000:5000"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://postgres:postgres@database:5432/biggs_permit
- DOCKER_ENV=true
- PGHOST=database
- PGPORT=5432
- PGUSER=postgres
- PGPASSWORD=postgres
- PGDATABASE=biggs_permit
depends_on:
database:
condition: service_healthy
volumes:
- ./uploads:/app/uploads
- app_node_modules:/app/node_modules
networks:
- biggs-network
restart: unless-stopped
volumes:
postgres_data:
app_node_modules:
networks:
biggs-network:
driver: bridge