-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker-compose.prod.yml
186 lines (167 loc) · 4.39 KB
/
docker-compose.prod.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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
version: '3.4'
# envs https://medium.com/softonic-eng/docker-compose-from-development-to-production-88000124a57c
services:
ingress:
image: nginx
network_mode: host
volumes:
- ./docker/nginx/config:/etc/nginx/conf.d
- ./docker/nginx/ssl:/etc/nginx/ssl
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
postgis:
image: postgis/postgis:15-3.4-alpine
container_name: postgis
restart: unless-stopped
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
expose:
- 5433
ports:
- "5433:5432"
logging:
driver: json-file
options:
max-size: 10m
networks:
- postgis
feedless-agent:
image: damoeb/feedless:agent-latest
# deploy:
# replicas: 2
security_opt:
- seccomp=./chrome.json
restart: unless-stopped
environment:
- APP_EMAIL=${APP_ROOT_EMAIL}
- APP_SECRET_KEY=${APP_ROOT_SECRET_KEY}
- APP_HOST=feedless-core:8080
- APP_PRERENDER_TIMEOUT_MILLIS=${APP_PRERENDER_TIMEOUT_MILLIS}
- APP_HOST=feedless-core:8080
- APP_SECURE=false
logging:
driver: json-file
options:
max-size: 10m
ports:
- "3000:3000"
# healthcheck:
# test: curl -f https://localhost:3000 || exit 1
networks:
- puppeteer
- monitoring
feedless-app:
image: damoeb/feedless:app-latest
restart: unless-stopped
volumes:
- ./docker/app-config.json:/usr/share/nginx/html/config.json
ports:
- "4200:80"
feedless-core:
image: damoeb/feedless:core-latest
restart: unless-stopped
healthcheck:
test: curl -f http://localhost:8080
interval: 60s
timeout: 10s
retries: 10
depends_on:
- postgis
ports:
- "8082:8080"
volumes:
- ./feedless.pem:/usr/feedless/feedless.pem
- ./debug/:/usr/feedless/debug/ # heap dump directory
env_file:
- .env
environment:
- APP_DATABASE_URL=jdbc:postgresql://postgis:5432/${POSTGRES_DB}
- APP_ACTIVE_PROFILES=saas
- APP_PEM_FILE=./feedless.pem
- APP_WHITELISTED_HOSTS=feedless-core,172.26.0.1
- AUTH_TOKEN_ANONYMOUS_VALIDFORDAYS=3
- app.cors.allowedOrigins=https://feedless.org
- APP_PLAUSIBLE_URL=http://plausible:8000
networks:
- postgis
- monitoring
- puppeteer
loki:
image: grafana/loki:2.5.0
volumes:
- ./docker/loki:/etc/loki
ports:
- "3100:3100"
command: -config.file=/etc/loki/loki.yml
networks:
- monitoring
prometheus:
image: prom/prometheus
environment:
- APP_ACTUATOR_PASSWORD=${APP_ACTUATOR_PASSWORD}
volumes:
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
networks:
- monitoring
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
networks:
- monitoring
plausible_db:
# Plausible v2.1.1 was tested against PostgreSQL versions 15 and 16
# https://github.com/plausible/analytics/blob/v2.1.1/.github/workflows/elixir.yml#L21-L32
image: postgres:16-alpine
restart: always
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=postgres
networks:
- monitoring
plausible_events_db:
image: clickhouse/clickhouse-server:24.3.3.102-alpine
restart: always
volumes:
- event-data:/var/lib/clickhouse
- event-logs:/var/log/clickhouse-server
- ./plausible/clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro
- ./plausible/clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro
ulimits:
nofile:
soft: 262144
hard: 262144
networks:
- monitoring
plausible:
image: ghcr.io/plausible/community-edition:v2.1.1
restart: always
command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
depends_on:
- plausible_db
- plausible_events_db
ports:
- 8088:8000
env_file:
- docker/plausible/plausible-conf.env
networks:
- monitoring
volumes:
db-data:
driver: local
event-data:
driver: local
event-logs:
driver: local
secrets:
TOKEN_SECRET:
file: ./tokenSecret.txt
networks:
postgis:
driver: bridge
monitoring:
driver: bridge