-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
70 lines (67 loc) · 1.67 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
version: '3'
services:
web:
image: kinduff/dogapi.dog:latest
restart: unless-stopped
environment:
- REDIS_URL=redis://redis
- DATABASE_URL=postgres://postgres:postgres@postgres
- RAILS_SERVE_STATIC_FILES=true
depends_on:
- postgres
- redis
networks:
- web
- internal
links:
- postgres:postgres
- redis:redis
labels:
- traefik.http.routers.dogapidog.rule=Host(`dogapi.dog`)
- traefik.http.routers.dogapidog.tls=true
- traefik.http.routers.dogapidog.tls.certresolver=lets-encrypt
- traefik.port=80
- com.centurylinklabs.watchtower.enable=true
- com.centurylinklabs.watchtower.lifecycle.post-update=bin/after_deploy
postgres:
image: postgres:13
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=postgres
volumes:
- pg_data:/var/lib/postgresql/data
networks:
- internal
redis:
image: redis
volumes:
- redis_data:/data
networks:
- internal
watchtower:
container_name: watchtower
image: containrrr/watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/kinduff/.docker/config.json:/config.json
environment:
- TZ=Europe/Madrid
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_POLL_INTERVAL=60
- WATCHTOWER_DEBUG=true
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_LIFECYCLE_HOOKS=true
- WATCHTOWER_ROLLING_RESTART=true
labels:
- com.centurylinklabs.watchtower.enable=true
networks:
- internal
volumes:
pg_data:
redis_data:
networks:
web:
external: true
internal:
external: false