-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-swarm.yaml
More file actions
91 lines (86 loc) · 2.53 KB
/
docker-compose-swarm.yaml
File metadata and controls
91 lines (86 loc) · 2.53 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
version: "3.8"
services:
nginx:
image: ghcr.io/cssnr/docker-nginx-proxy:latest
environment:
SERVICE_NAME: "app"
SERVICE_PORT: "3000"
GZIP_TYPES: "text/html image/svg+xml"
deploy:
replicas: 1
resources:
limits:
cpus: "1.0"
memory: 64M
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.constraint-label=traefik-public"
- "traefik.http.routers.${STACK_NAME?err}-http.rule=Host(`${TRAEFIK_HOST?err}`)"
- "traefik.http.routers.${STACK_NAME}-http.entrypoints=http"
- "traefik.http.routers.${STACK_NAME}-http.middlewares=${STACK_NAME}-http-redirect"
- "traefik.http.middlewares.${STACK_NAME}-http-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.${STACK_NAME}-http-redirect.redirectscheme.permanent=true"
- "traefik.http.routers.${STACK_NAME}-https.rule=Host(`${TRAEFIK_HOST}`)"
- "traefik.http.routers.${STACK_NAME}-https.entrypoints=https"
- "traefik.http.routers.${STACK_NAME}-https.tls=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.scheme=http"
healthcheck:
test: ["CMD-SHELL", "curl -sf localhost:80/health-check || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
depends_on:
- app
networks:
- internal
- traefik-public
app:
image: ghcr.io/smashedr/node-badges:${VERSION:-latest}
environment:
GITHUB_TOKEN: ${GITHUB_TOKEN}
VT_API_KEY: ${VT_API_KEY}
SENTRY_URL: ${SENTRY_URL}
SENTRY_ENVIRONMENT: ${SENTRY_ENVIRONMENT}
INFLUX_URL: ${INFLUX_URL}
INFLUX_TOKEN: ${INFLUX_TOKEN}
INFLUX_ORG: ${INFLUX_ORG}
INFLUX_BUCKET: ${INFLUX_BUCKET}
deploy:
replicas: 1
resources:
limits:
cpus: "2.0"
memory: 256M
healthcheck:
test: ["CMD-SHELL", "curl -sf localhost:3000/app-health-check || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
depends_on:
- redis
networks:
- internal
redis:
image: redis:6-alpine
command: "redis-server --appendonly yes"
deploy:
replicas: 1
resources:
limits:
cpus: "1.0"
memory: 64M
volumes:
- redis_data:/data
networks:
- internal
volumes:
redis_data:
networks:
internal:
driver: overlay
traefik-public:
external: true