Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion observability/loki/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ volumes:
services:
loki:
container_name: loki
image: grafana/loki:3.7.5
image: grafana/loki:3.7.6
command: -config.file=/etc/loki/config.yaml
volumes:
- ./config.yaml:/etc/loki/config.yaml
Expand Down
282 changes: 141 additions & 141 deletions stacks/infrastructure.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,96 @@
# Generated by stackctl generate β€” do not edit manually.
services:
mongo:
image: 'mongo:8.3.7'
networks:
default:
aliases:
- mongo
env_file:
- ./mongo/.env
environment:
- GLIBC_TUNABLES=glibc.pthread.rseq=1
volumes:
- 'mongo-data:/data/db'
- 'mongo-data:/data/configdb'
labels:
- 'traefik.enable=${TRAEFIK_ENABLE}'
- 'traefik.tcp.routers.mongo.rule=HostSNI(`${HOST}`)'
- traefik.tcp.routers.mongo.entrypoints=websecure
- traefik.tcp.routers.mongo.service=mongo
- traefik.tcp.routers.mongo.tls=true
- 'traefik.tcp.routers.mongo.tls.certresolver=${CERT_RESOLVER}'
- 'traefik.tcp.services.mongo.loadbalancer.server.port=${PORT}'
healthcheck:
test:
- CMD-SHELL
- 'mongosh --quiet --eval "db.runCommand({ping:1}).ok ? quit(0) : quit(1)"'
interval: 10s
timeout: 10s
retries: 5
start_period: 60s
deploy:
resources:
reservations:
memory: 256M
limits:
memory: 800M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 0
window: 120s
logging:
driver: local
options:
max-size: 10m
max-file: 3
traefik:
image: 'traefik:v3.7'
networks:
default:
aliases:
- traefik
ports:
- '80:80'
- '443:443'
env_file: ./traefik/.env
volumes:
- 'traefik-ssl-certs:/etc/traefik/certs'
- './traefik/auth/htpasswd:/etc/htpasswd:ro'
- './traefik/config/traefik.yml:/etc/traefik/traefik.yml:ro'
- './traefik/config/dynamic.yml:/etc/traefik/dynamic.yml:ro'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
labels:
- 'traefik.enable=${TRAEFIK_ENABLE}'
- 'traefik.http.routers.traefik-ui.rule=Host(`${HOST}`)'
- 'traefik.http.routers.traefik-ui.entrypoints=web,websecure'
- traefik.http.routers.traefik-ui.service=api@internal
- traefik.http.routers.traefik-ui.middlewares=sso
- traefik.http.routers.traefik-ui.tls=true
- 'traefik.http.routers.traefik-ui.tls.certresolver=${CERT_RESOLVER}'
- 'traefik.http.middlewares.sso.plugin.trauth.domain=${TRUEAUTH_DOMAIN}'
- 'traefik.http.middlewares.sso.plugin.trauth.cookiename=${TRUEAUTH_COOKIE}'
- 'traefik.http.middlewares.sso.plugin.trauth.users=${SSO_CREDENTIALS}'
- 'traefik.http.services.traefik-ui.loadbalancer.server.port=${PORT}'
logging:
options:
max-size: 10m
max-file: 3
deploy:
mode: global
placement:
constraints:
- node.role == manager
restart_policy:
condition: any
resources:
reservations:
memory: 128M
cpus: '0.10'
limits:
memory: 512M
cpus: '0.50'
apisix_dashboard:
image: 'apache/apisix-dashboard:3.0.1-alpine'
networks:
Expand Down Expand Up @@ -48,53 +139,6 @@ services:
delay: 10s
max_attempts: 10
window: 180s
apisix_gateway:
image: 'apache/apisix:3.17.0-debian'
networks:
default:
aliases:
- apisix-gateway
env_file:
- ./apisix/api-gateway/.env
volumes:
- './apisix/api-gateway/config/apisix.yaml:/usr/local/apisix/conf/config.yaml:ro'
- 'cache:/tmp/apisix-cache/'
healthcheck:
test:
- CMD-SHELL
- test -s /usr/local/apisix/logs/nginx.pid
interval: 20s
timeout: 5s
retries: 3
labels:
- 'traefik.enable=${TRAEFIK_ENABLE}'
- 'traefik.http.routers.apisix.rule=Host(`${HOST}`)'
- 'traefik.http.routers.apisix.entrypoints=web,websecure'
- traefik.http.routers.apisix.service=apisix
- traefik.http.routers.apisix.tls=true
- 'traefik.http.routers.apisix.tls.certresolver=${CERT_RESOLVER}'
- 'traefik.http.services.apisix.loadbalancer.server.port=${PORT}'
logging:
options:
max-size: 10m
max-file: 3
deploy:
mode: global
placement:
constraints:
- node.role == manager
resources:
reservations:
memory: 128M
cpus: '0.10'
limits:
memory: 384M
cpus: '0.40'
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 10
window: 180s
etcd:
image: 'bitnamilegacy/etcd:3.6.4'
networks:
Expand Down Expand Up @@ -128,45 +172,53 @@ services:
delay: 5s
max_attempts: 0
window: 120s
redis:
image: 'redis:8.10-alpine'
apisix_gateway:
image: 'apache/apisix:3.17.0-debian'
networks:
default:
aliases:
- redis
command: redis-server --appendonly yes
env_file: ./redis/.env
labels:
- 'traefik.enable=${TRAEFIK_ENABLE}'
- 'traefik.tcp.routers.redis.rule=HostSNI(`${HOST}`)'
- traefik.tcp.routers.redis.entrypoints=websecure
- traefik.tcp.routers.redis.service=redis
- traefik.tcp.routers.redis.tls=true
- 'traefik.tcp.routers.redis.tls.certresolver=${CERT_RESOLVER}'
- 'traefik.tcp.services.redis.loadbalancer.server.port=${PORT}'
- apisix-gateway
env_file:
- ./apisix/api-gateway/.env
volumes:
- './apisix/api-gateway/config/apisix.yaml:/usr/local/apisix/conf/config.yaml:ro'
- 'cache:/tmp/apisix-cache/'
healthcheck:
test:
- CMD-SHELL
- redis-cli ping | grep -q PONG
interval: 10s
- test -s /usr/local/apisix/logs/nginx.pid
interval: 20s
timeout: 5s
retries: 3
start_period: 20s
labels:
- 'traefik.enable=${TRAEFIK_ENABLE}'
- 'traefik.http.routers.apisix.rule=Host(`${HOST}`)'
- 'traefik.http.routers.apisix.entrypoints=web,websecure'
- traefik.http.routers.apisix.service=apisix
- traefik.http.routers.apisix.tls=true
- 'traefik.http.routers.apisix.tls.certresolver=${CERT_RESOLVER}'
- 'traefik.http.services.apisix.loadbalancer.server.port=${PORT}'
logging:
options:
max-size: 10m
max-file: 3
deploy:
mode: global
placement:
constraints:
- node.role == manager
resources:
reservations:
memory: 32M
limits:
memory: 128M
cpus: '0.10'
limits:
memory: 384M
cpus: '0.40'
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 0
window: 120s
delay: 10s
max_attempts: 10
window: 180s
portainer:
image: 'portainer/portainer-ce:2.44.0'
volumes:
Expand Down Expand Up @@ -203,97 +255,45 @@ services:
limits:
memory: 512M
cpus: '0.50'
mongo:
image: 'mongo:8.3.7'
redis:
image: 'redis:8.10-alpine'
networks:
default:
aliases:
- mongo
env_file:
- ./mongo/.env
environment:
- GLIBC_TUNABLES=glibc.pthread.rseq=1
volumes:
- 'mongo-data:/data/db'
- 'mongo-data:/data/configdb'
- redis
command: redis-server --appendonly yes
env_file: ./redis/.env
labels:
- 'traefik.enable=${TRAEFIK_ENABLE}'
- 'traefik.tcp.routers.mongo.rule=HostSNI(`${HOST}`)'
- traefik.tcp.routers.mongo.entrypoints=websecure
- traefik.tcp.routers.mongo.service=mongo
- traefik.tcp.routers.mongo.tls=true
- 'traefik.tcp.routers.mongo.tls.certresolver=${CERT_RESOLVER}'
- 'traefik.tcp.services.mongo.loadbalancer.server.port=${PORT}'
- 'traefik.tcp.routers.redis.rule=HostSNI(`${HOST}`)'
- traefik.tcp.routers.redis.entrypoints=websecure
- traefik.tcp.routers.redis.service=redis
- traefik.tcp.routers.redis.tls=true
- 'traefik.tcp.routers.redis.tls.certresolver=${CERT_RESOLVER}'
- 'traefik.tcp.services.redis.loadbalancer.server.port=${PORT}'
healthcheck:
test:
- CMD-SHELL
- 'mongosh --quiet --eval "db.runCommand({ping:1}).ok ? quit(0) : quit(1)"'
- redis-cli ping | grep -q PONG
interval: 10s
timeout: 10s
retries: 5
start_period: 60s
timeout: 5s
retries: 3
start_period: 20s
logging:
options:
max-size: 10m
max-file: 3
deploy:
resources:
reservations:
memory: 256M
memory: 32M
limits:
memory: 800M
memory: 128M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 0
window: 120s
logging:
driver: local
options:
max-size: 10m
max-file: 3
traefik:
image: 'traefik:v3.7'
networks:
default:
aliases:
- traefik
ports:
- '80:80'
- '443:443'
env_file: ./traefik/.env
volumes:
- 'traefik-ssl-certs:/etc/traefik/certs'
- './traefik/auth/htpasswd:/etc/htpasswd:ro'
- './traefik/config/traefik.yml:/etc/traefik/traefik.yml:ro'
- './traefik/config/dynamic.yml:/etc/traefik/dynamic.yml:ro'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
labels:
- 'traefik.enable=${TRAEFIK_ENABLE}'
- 'traefik.http.routers.traefik-ui.rule=Host(`${HOST}`)'
- 'traefik.http.routers.traefik-ui.entrypoints=web,websecure'
- traefik.http.routers.traefik-ui.service=api@internal
- traefik.http.routers.traefik-ui.middlewares=sso
- traefik.http.routers.traefik-ui.tls=true
- 'traefik.http.routers.traefik-ui.tls.certresolver=${CERT_RESOLVER}'
- 'traefik.http.middlewares.sso.plugin.trauth.domain=${TRUEAUTH_DOMAIN}'
- 'traefik.http.middlewares.sso.plugin.trauth.cookiename=${TRUEAUTH_COOKIE}'
- 'traefik.http.middlewares.sso.plugin.trauth.users=${SSO_CREDENTIALS}'
- 'traefik.http.services.traefik-ui.loadbalancer.server.port=${PORT}'
logging:
options:
max-size: 10m
max-file: 3
deploy:
mode: global
placement:
constraints:
- node.role == manager
restart_policy:
condition: any
resources:
reservations:
memory: 128M
cpus: '0.10'
limits:
memory: 512M
cpus: '0.50'
networks:
default:
name: traefik-public
Expand Down
Loading
Loading