-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (52 loc) · 1.51 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (52 loc) · 1.51 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
# VPS deployment (deployment PRD §3, §7, §8). One image, two roles + Caddy.
#
# cp .env.example .env.production # fill PRODUCTION values
# export DOMAIN=app.renderai.com
# docker compose build
# docker compose run --rm web pnpm db:migrate # first deploy only
# docker compose run --rm web pnpm db:seed # first deploy only
# docker compose up -d
# # scale workers (deployment PRD §13): docker compose up -d --scale worker=2
#
# Queue is PostgreSQL-backed, so no Redis container is required. A Redis service
# is left commented for a future BullMQ migration.
name: renderai
services:
web:
build:
context: .
image: renderai:latest
env_file: .env.production
environment:
PORT: "3000"
expose:
- "3000"
restart: unless-stopped
worker:
image: renderai:latest
command: pnpm worker
env_file: .env.production
restart: unless-stopped
depends_on:
- web
caddy:
image: caddy:2-alpine
environment:
DOMAIN: ${DOMAIN:?set DOMAIN to your production hostname}
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
depends_on:
- web
restart: unless-stopped
# redis: # only needed if you migrate the queue to BullMQ
# image: redis:7-alpine
# command: ["redis-server", "--maxmemory", "256mb", "--maxmemory-policy", "noeviction"]
# restart: unless-stopped
volumes:
caddy_data:
caddy_config: