-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
78 lines (73 loc) · 1.86 KB
/
docker-compose.local.yml
File metadata and controls
78 lines (73 loc) · 1.86 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
69
70
71
72
73
74
75
76
77
78
# Production-like environment for local testing
# Builds image locally from Dockerfile
services:
app:
build:
context: .
dockerfile: docker/Dockerfile
image: apprun:local
container_name: apprun-app-local
restart: unless-stopped
ports:
- "8080:8080"
- "8443:8443"
environment:
- SERVER_ENV=production
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
- DATABASE_USER=apprun
- DATABASE_PASSWORD=local_prod_password
- DATABASE_DB_NAME=apprun_prod_local
- DATABASE_AUTO_MIGRATE=true
- REDIS_HOST=redis
- REDIS_PORT=6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- apprun-prod-local
postgres:
image: postgres:15-alpine
container_name: apprun-postgres-local
restart: unless-stopped
environment:
POSTGRES_USER: apprun
POSTGRES_PASSWORD: local_prod_password
POSTGRES_DB: apprun_prod_local
volumes:
- postgres_prod_local_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U apprun"]
interval: 5s
timeout: 3s
retries: 5
networks:
- apprun-prod-local
redis:
image: redis:7-alpine
container_name: apprun-redis-local
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- redis_prod_local_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
- apprun-prod-local
volumes:
postgres_prod_local_data:
redis_prod_local_data:
networks:
apprun-prod-local:
driver: bridge