-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcompose.yml
68 lines (66 loc) · 1.91 KB
/
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
services:
traefik:
image: traefik:v3.3
environment:
- TZ=Asia/Jakarta
command:
- "--log.level=ERROR"
# - "--accesslog=true"
# - "--accesslog.fields.names.StartUTC=drop"
- "--api.insecure=true"
- "--api.dashboard=true"
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=${COMPOSE_PROJECT_NAME}_default"
- "--entryPoints.web.address=:80"
ports:
- name: web
target: 80
published: 3000
protocol: tcp
app_protocol: http
mode: ingress
- name: manage-ui
target: 8080
published: 8334
protocol: tcp
app_protocol: http
mode: ingress
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
resources:
limits:
cpus: "1"
memory: 512M
app:
build: .
image: ghcr.io/mata-elang-stable/iplookup-api:latest
environment:
LISTEN_PORT: 3000
MMDB_REGION_FILE_PATH: /usr/share/GeoIP/GeoLite2-City.mmdb
MMDB_ASN_FILE_PATH: /usr/share/GeoIP/GeoLite2-ASN.mmdb
ENABLE_CACHE: false
REDIS_URL: redis:6379
CACHE_TTL_SEC: 3600
VERBOSE: 0
labels:
- traefik.enable=true
- traefik.http.routers.app.rule=PathPrefix(`/`)
- traefik.http.routers.app.entrypoints=web
- traefik.http.services.app.loadbalancer.server.port=3000
- http.services.main.loadBalancer.healthCheck.path=/health
- http.services.main.loadBalancer.healthCheck.interval=10s
- http.services.main.loadBalancer.healthCheck.timeout=3s
scale: 3
volumes:
- ./files/GeoLite2-City.mmdb:/usr/share/GeoIP/GeoLite2-City.mmdb
- ./files/GeoLite2-ASN.mmdb:/usr/share/GeoIP/GeoLite2-ASN.mmdb
deploy:
resources:
limits:
cpus: "0.5"
memory: 50M
redis:
image: valkey/valkey:8
restart: unless-stopped