-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
86 lines (82 loc) · 2.64 KB
/
Copy pathdocker-compose-dev.yml
File metadata and controls
86 lines (82 loc) · 2.64 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
# =============================================================================
# folo Dev Infrastructure
# PostgreSQL + Redis + Web frontend — run server locally with: pnpm dev
# =============================================================================
services:
# ---------------------------------------------------------------------------
# PostgreSQL 17
# ---------------------------------------------------------------------------
postgres:
image: postgres:17-alpine
container_name: folo-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-folo}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set}
POSTGRES_DB: ${POSTGRES_DB:-folo}
volumes:
- ./data/postgresql:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-folo} -d ${POSTGRES_DB:-folo}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- folo-net
deploy:
resources:
limits:
memory: 1g
# ---------------------------------------------------------------------------
# Redis 8
# ---------------------------------------------------------------------------
redis:
image: redis:8-alpine
container_name: folo-redis
restart: unless-stopped
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD:?REDIS_PASSWORD must be set} --maxmemory 512mb --maxmemory-policy allkeys-lru
volumes:
- ./data/redis:/data
ports:
- "${REDIS_PORT:-6379}:6379"
healthcheck:
test: ["CMD-SHELL", "REDISCLI_AUTH=${REDIS_PASSWORD} redis-cli ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- folo-net
deploy:
resources:
limits:
memory: 512m
# ---------------------------------------------------------------------------
# SSR Web Frontend (dev mode — hot reload via mounted source)
# ---------------------------------------------------------------------------
folo:
image: node:22-alpine
container_name: folo
working_dir: /app
volumes:
- .:/app
- /app/node_modules
- /app/apps/ssr/node_modules
command: sh -c "npm install --global pnpm@11.5.2 && pnpm --filter @follow/ssr dev"
environment:
NODE_ENV: development
VITE_API_URL: http://host.docker.internal:3000
VITE_EXTERNAL_API_URL: http://localhost:3000
VITE_WEB_URL: http://localhost:2234
ports:
- "2234:2234"
networks:
- folo-net
deploy:
resources:
limits:
memory: 1g
networks:
folo-net:
driver: bridge