-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (50 loc) · 1.23 KB
/
docker-compose.yml
File metadata and controls
54 lines (50 loc) · 1.23 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
version: "3.8"
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: arcarchiver
POSTGRES_PASSWORD: arcarchiver_password
POSTGRES_DB: arcarchiver
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U arcarchiver -d arcarchiver"]
interval: 10s
timeout: 5s
retries: 5
# Application
app:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
environment:
NODE_ENV: production
DATABASE_URL: postgresql://arcarchiver:arcarchiver_password@postgres:5432/arcarchiver
SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN}
ports:
- "3001:3000"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Optional: Database management tool
adminer:
image: adminer:4.8.1
restart: unless-stopped
environment:
ADMINER_DEFAULT_SERVER: postgres
depends_on:
- postgres
volumes:
postgres_data: