-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
74 lines (70 loc) · 2.09 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
74 lines (70 loc) · 2.09 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
name: uptime
services:
traefik:
image: traefik:v3.0
restart: unless-stopped
command:
- --log.level=DEBUG
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
ports:
- 80:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
traefik.enable: "true"
traefik.http.routers.traefik-dashboard.rule: Host(`traefik.uptime.arpa`)
traefik.http.routers.traefik-dashboard.service: traefik-dashboard-service
traefik.http.routers.traefik-dashboard.entrypoints: web
traefik.http.services.traefik-dashboard-service.loadbalancer.server.port: 8080
app:
depends_on:
- postgres
build:
context: ./app
dockerfile: Dockerfile
restart: unless-stopped
deploy:
replicas: 1
environment:
DATABASE_HOST: postgres
DATABASE_PORT: 5432
MIX_ENV: dev
SERVER_URL: http://uptime.arpa
env_file:
- .env
volumes:
- ./:/app
labels:
traefik.enable: "true"
traefik.http.routers.app.rule: Host(`uptime.arpa`)
traefik.http.routers.app.entrypoints: web
traefik.http.services.app.loadbalancer.server.port: 4000
toxiproxy:
image: ghcr.io/shopify/toxiproxy:2.9.0
restart: unless-stopped
ports:
- 8474:8474
labels:
traefik.enable: "true"
traefik.http.routers.toxiproxy.rule: Host(`toxiproxy.uptime.arpa`)
traefik.http.routers.toxiproxy.service: toxiproxy-service
traefik.http.routers.toxiproxy.entrypoints: web
traefik.http.services.toxiproxy.loadbalancer.server.port: 8474
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${DATABASE_NAME:-uptime}
POSTGRES_USER: ${DATABASE_USER:-postgres}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-postgres}
PGOPTIONS: -c log_statement=all
PGDATA: /var/lib/postgresql/data
env_file:
- .env
ports:
- ${DATABASE_PORT:-5432}:5432
volumes:
- ./docker/data/postgres:/var/lib/postgresql/data