-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (100 loc) · 2.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
105 lines (100 loc) · 2.65 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
services:
db:
image: postgres:18-alpine
restart: unless-stopped
environment:
POSTGRES_USER: "${POSTGRES_USER:-devuser}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-devuser}"
POSTGRES_DB: "${POSTGRES_DB:-devdb}"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432"
networks:
- backend
redis:
image: valkey/valkey:9-alpine@sha256:b4ee67d73e00393e712accc72cfd7003b87d0fcd63f0eba798b23251bfc9c394
restart: unless-stopped
command: valkey-server --save 60 1 --appendonly yes --appendfsync everysec --loglevel warning
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- redisdata:/data
networks:
- backend
server:
build:
context: ./server
dockerfile: Dockerfile.dev
restart: "no"
init: true
working_dir: /app
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- .env
environment:
MIDDLEWARE__SESSION_SECURE: "false"
ADMIN_PASSWORD: "${ADMIN_PASSWORD:-changeme}"
MIDDLEWARE__LIMIT__REQ_PER_SEC: "1000000"
DATABASE_URL: "postgres://${POSTGRES_USER:-devuser}:${POSTGRES_PASSWORD:-devuser}@db:5432/${POSTGRES_DB:-devdb}"
REDIS_URL: "redis://redis:6379"
ports:
- "${SERVER_PORT:-12345}:12345"
volumes:
- ./server:/app
- cargo_registry:/usr/local/cargo/registry
- cargo_git:/usr/local/cargo/git
- server_target:/app/target
- server_public:/app/public
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:12345/health_check"]
interval: 5s
timeout: 3s
retries: 12
start_period: 120s
command: cargo run
networks:
- backend
web:
image: node:24-bookworm-slim
restart: unless-stopped
init: true
working_dir: /app
depends_on:
server:
condition: service_healthy
environment:
CI: "true"
VITE_SERVER_URL: "http://server:12345"
ports:
- "${WEB_PORT:-3000}:3000"
volumes:
- ./web:/app
- node_modules:/app/node_modules
- pnpm-store:/pnpm-store
command: sh -c "corepack enable && corepack prepare pnpm@10 --activate && pnpm install --frozen-lockfile --store-dir /pnpm-store && pnpm dev --host 0.0.0.0"
networks:
- backend
networks:
backend:
volumes:
cargo_git:
cargo_registry:
pgdata:
redisdata:
pnpm-store:
node_modules:
server_public:
server_target: