-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
72 lines (72 loc) · 2.05 KB
/
docker-compose.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
services:
api:
image: rg.nl-ams.scw.cloud/pedr0/harss-api:latest
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "9090:8080"
links:
- redis
- postgres
# - jaeger
environment:
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-changeme}@postgres/rss-aggregator
JWT_SECRET: 6ce319be-880a-419f-a39e-0058bceec28a
PASSWORD_SALT: fd364f91-1fbb-41f2-8d90-33c7231e3cfa
RSS_AGGREGATOR_ALLOW_ACCOUNT_CREATION: false
REDIS_URL: redis://redis
POLLING_INTERVAL: 300
# JAEGER_AGENT_ENDPOINT: jaeger:6831
# DD_AGENT_ENDPOINT: http://host.docker.internal:8126
RUST_LOG: info,selectors::matching=none
restart: unless-stopped
depends_on:
migrations:
condition: service_completed_successfully
postgres:
condition: service_healthy
redis:
condition: service_started
# jaeger:
# condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/v1/ping"]
redis:
image: redis:alpine
restart: unless-stopped
postgres:
image: postgres:alpine
environment:
POSTGRES_DB: rss-aggregator
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
PGDATA: /data/postgres
restart: unless-stopped
volumes:
- database:/data/postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}" ]
interval: 5s
timeout: 5s
retries: 5
migrations:
build:
context: migrations
command: sqlx migrate run
volumes:
- "$PWD:/volume"
links:
- postgres
environment:
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-changeme}@postgres/rss-aggregator
working_dir: /volume
depends_on:
postgres:
condition: service_healthy
# jaeger:
# image: jaegertracing/all-in-one
# ports:
# - 16686:16686 # Expose Web UI
# restart: unless-stopped
volumes:
database: {}