Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
127 lines (119 loc) · 2.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
127 lines (119 loc) · 2.3 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
version: '3.4'
services:
db:
image: "postgres:14"
restart: always
read_only: true
volumes:
- db-data:/var/lib/postgresql/data
tmpfs:
- /tmp
- /run
environment:
POSTGRES_USER: "sanic"
POSTGRES_PASSWORD: "toomanysecrets"
POSTGRES_DB: "sanic"
command: ["postgres", "-c", "shared_buffers=1GB", "-c", "max_connections=1024"]
networks:
- db
backend:
image: ${IMAGE_BASE}/backend:${DEPLOY_VERSION}
build: .
read_only: true
restart: always
environment:
SANIC_DB_HOST: db
SANIC_DB_USER: sanic
SANIC_DB_PASSWORD: toomanysecrets
SANIC_DB_NAME: sanic
SANIC_AUTHORITY: dev.unchanging.ink
PYTHONUNBUFFERED: 1
tmpfs:
- /tmp
depends_on:
- db
- redis
networks:
- db
- web
- redis
worker:
image: ${IMAGE_BASE}/worker:${DEPLOY_VERSION}
restart: always
build:
context: .
target: worker
read_only: true
environment:
SANIC_DEBUG: $DEBUG
SANIC_DB_HOST: db
SANIC_DB_USER: sanic
SANIC_DB_PASSWORD: toomanysecrets
SANIC_DB_NAME: sanic
depends_on:
- db
- redis
networks:
- db
- redis
frontend:
image: ${IMAGE_BASE}/frontend:${DEPLOY_VERSION}
restart: always
build:
context: .
target: frontend
environment:
HOST: "0"
PORT: "3000"
AUTHORITY: "dev.unchanging.ink"
read_only: true
depends_on:
- redis
networks:
- web
- redis
redis:
image: redis:6-alpine
restart: always
volumes:
- ./redis.conf:/etc/redis.conf:ro
command:
- /etc/redis.conf
networks:
- redis
read_only: true
tmpfs:
- /tmp
- /run
proxy:
image: fholzer/nginx-brotli
ports:
- "127.0.0.1:$PROXYPORT:80"
restart: always
depends_on:
- backend
- frontend
networks:
- web
- default
volumes:
- ./default.conf:/etc/nginx/conf.d/default.conf:ro
- ./nginx.conf:/etc/nginx/nginx.conf:ro
read_only: true
tmpfs:
- /tmp
- /run
- /var/cache/nginx
networks:
db:
driver: bridge
internal: true
web:
driver: bridge
internal: true
redis:
driver: bridge
internal: true
default:
volumes:
db-data: