-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.production.yml
68 lines (58 loc) · 1.53 KB
/
docker-compose.production.yml
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
services:
router:
build: packages/router
depends_on:
- server
- og-injector
ports:
- "127.0.0.1:${APP_PORT}:443"
volumes:
- ./.volumes/images:/opt/images:ro
- ./.volumes/client:/opt/client:ro
- "${SSL_CRT}:/opt/ssl/current.crt:ro"
- "${SSL_KEY}:/opt/ssl/current.key:ro"
server:
build: packages/server
command: bin/rails s -p 3000 -b 0.0.0.0
volumes:
- ./.volumes/images:/opt/images:rw
depends_on:
- db
environment:
RAILS_ENV: production
APP_HOST: "${APP_HOST}"
APP_URL: "${APP_URL}"
APP_NAME: "${APP_NAME}"
DB_HOST: db # internal docker host
DB_PORT: 5432
DB_NAME: "${DB_NAME}"
DB_USER: "${DB_USER}"
DB_PASS: "${DB_PASS}"
TOKEN_SECRET: "${TOKEN_SECRET}"
IMAGES_DIR: "/opt/images"
client:
build: packages/client
volumes:
- ./.volumes/client:/opt/app/dist:rw
environment:
NODE_ENV: production
VITE_ENV: production
VITE_SERVER_URL: "${APP_URL}/api"
command: yarn build
og-injector:
build: packages/og-injector
volumes:
- ./.volumes/client:/opt/client:ro
environment:
APP_NAME: "${APP_NAME}"
APP_URL: "${APP_URL}"
SERVER_URL: "http://server:3000" # internal docker url
CLIENT_DIR: "/opt/client"
db:
image: postgres:16
volumes:
- ./.volumes/db/pg16:/var/lib/postgresql/data:rw
environment:
POSTGRES_DB: "${DB_NAME}"
POSTGRES_USER: "${DB_USER}"
POSTGRES_PASSWORD: "${DB_PASS}"