forked from sheikyerbouti100/kosuke-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
90 lines (84 loc) · 1.93 KB
/
docker-compose.local.yml
File metadata and controls
90 lines (84 loc) · 1.93 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
79
80
81
82
83
84
85
86
87
88
89
90
x-app: &app
build:
context: .
dockerfile: Dockerfile.local
env_file:
- .env
networks:
- kosuke_network
restart: unless-stopped
services:
postgres:
image: postgres:16.4-alpine
container_name: kosuke_postgres
env_file:
- .env
ports:
- '54323:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- kosuke_network
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U $POSTGRES_USER -d $POSTGRES_DB']
interval: 3s
timeout: 2s
retries: 3
start_period: 5s
redis:
image: redis:7-alpine
container_name: kosuke_redis
ports:
- '6379:6379'
volumes:
- redis_data:/data
networks:
- kosuke_network
healthcheck:
test: ['CMD', 'redis-cli', '-a', '${REDIS_PASSWORD}', 'ping']
interval: 5s
timeout: 3s
retries: 5
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}
nextjs:
<<: *app
container_name: kosuke_nextjs
ports:
- '3000:3000'
environment:
- HOST_PROJECT_PATH=${PWD}
volumes:
- .:/app:cached
- /app/node_modules
- /app/.next
- /dev/null:/app/.env.local:ro # Shadow .env.local with empty file
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
postgres:
condition: service_healthy
worker:
<<: *app
container_name: kosuke_worker
ports: []
command: npx tsx watch src/worker.ts
environment:
- HOST_PROJECT_PATH=${PWD}
volumes:
- .:/app:cached
- /app/node_modules
- /app/.next
- /dev/null:/app/.env.local:ro # Shadow .env.local with empty file
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
volumes:
postgres_data:
redis_data:
networks:
kosuke_network:
name: kosuke_network
driver: bridge
attachable: true