-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.yml
71 lines (65 loc) · 1.44 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
69
70
71
version: '3.4'
services:
api:
image: ghcr.io/joosepalviste/serieslist-api:latest
build:
context: .
dockerfile: apps/api/Dockerfile
target: production
ports:
- '$API_PORT:$API_PORT'
env_file:
- .env
- .env.docker
depends_on:
- redis
networks:
- caddy
labels:
caddy: api.serieslist.joosep.xyz
caddy.reverse_proxy: "{{upstreams ${API_PORT}}}"
jobs:
image: ghcr.io/joosepalviste/serieslist-jobs:latest
command: pnpm start:prod
env_file:
- .env
- .env.docker
depends_on:
- redis
networks:
- caddy
webapp:
image: ghcr.io/joosepalviste/serieslist-webapp:latest
build:
context: .
dockerfile: apps/webapp/Dockerfile
target: production
args:
VITE_APP_PORT: $VITE_APP_PORT
VITE_API_URL: $VITE_API_URL
VITE_API_INTERNAL_URL: $VITE_API_INTERNAL_URL
ports:
- '$VITE_APP_PORT:$VITE_APP_PORT'
env_file:
- .env
- .env.docker
networks:
- caddy
labels:
caddy: serieslist.joosep.xyz
caddy.reverse_proxy: "{{upstreams ${VITE_APP_PORT}}}"
redis:
image: redis:7.0-alpine
restart: always
ports:
- '$REDIS_PORT:6379'
volumes:
- redisdata:/data
command: redis-server --save 20 1 --loglevel warning --requirepass $REDIS_PASSWORD
networks:
- caddy
volumes:
redisdata:
networks:
caddy:
external: true