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
146 changes: 73 additions & 73 deletions stacks/infrastructure.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# Generated by stackctl generate — do not edit manually.
services:
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
apisix_dashboard:
image: 'apache/apisix-dashboard:3.0.1-alpine'
networks:
Expand Down Expand Up @@ -81,32 +128,34 @@ services:
delay: 5s
max_attempts: 0
window: 120s
apisix_gateway:
image: 'apache/apisix:3.17.0-debian'
traefik:
image: 'traefik:v3.7'
networks:
default:
aliases:
- apisix-gateway
env_file:
- ./apisix/api-gateway/.env
- traefik
ports:
- '80:80'
- '443:443'
env_file: ./traefik/.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
- '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.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}'
- '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
Expand All @@ -116,18 +165,15 @@ services:
placement:
constraints:
- node.role == manager
restart_policy:
condition: any
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
memory: 512M
cpus: '0.50'
mongo:
image: 'mongo:8.3.8'
networks:
Expand Down Expand Up @@ -212,52 +258,6 @@ services:
delay: 5s
max_attempts: 0
window: 120s
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'
portainer:
image: 'portainer/portainer-ce:2.44.0'
volumes:
Expand Down
88 changes: 44 additions & 44 deletions stacks/observability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,34 @@ services:
limits:
memory: 384M
cpus: '0.40'
loki:
image: 'grafana/loki:3.7.5'
command: '-config.file=/etc/loki/config.yaml'
volumes:
- './observability/loki/config.yaml:/etc/loki/config.yaml'
- 'loki-data:/loki'
env_file: ./observability/loki/.env
networks:
default:
aliases:
- loki
logging:
options:
max-size: 10m
max-file: 3
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == manager
restart_policy:
condition: any
resources:
reservations:
memory: 256M
limits:
memory: 800M
prometheus:
image: 'prom/prometheus:v3.13.2'
command:
Expand Down Expand Up @@ -91,41 +119,6 @@ services:
limits:
memory: 1200M
cpus: '0.80'
grafana:
image: 'grafana/grafana-oss:13.0.2'
volumes:
- 'grafana-data:/var/lib/grafana'
- './observability/grafana/config/provisioning:/etc/grafana/provisioning/'
env_file: ./observability/grafana/.env
labels:
- 'traefik.enable=${TRAEFIK_ENABLE}'
- 'traefik.http.routers.grafana.rule=Host(`${HOST}`)'
- 'traefik.http.routers.grafana.entrypoints=web,websecure'
- traefik.http.routers.grafana.service=grafana
- traefik.http.routers.grafana.tls=true
- 'traefik.http.routers.grafana.tls.certresolver=${CERT_RESOLVER}'
- 'traefik.http.services.grafana.loadbalancer.server.port=${PORT}'
networks:
default:
aliases:
- grafana
logging:
options:
max-size: 10m
max-file: 3
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == manager
restart_policy:
condition: any
resources:
reservations:
memory: 128M
limits:
memory: 512M
memcached:
image: 'memcached:1.6.45'
environment:
Expand Down Expand Up @@ -174,17 +167,24 @@ services:
memory: 256M
limits:
memory: 600M
loki:
image: 'grafana/loki:3.7.5'
command: '-config.file=/etc/loki/config.yaml'
grafana:
image: 'grafana/grafana-oss:13.0.2'
volumes:
- './observability/loki/config.yaml:/etc/loki/config.yaml'
- 'loki-data:/loki'
env_file: ./observability/loki/.env
- 'grafana-data:/var/lib/grafana'
- './observability/grafana/config/provisioning:/etc/grafana/provisioning/'
env_file: ./observability/grafana/.env
labels:
- 'traefik.enable=${TRAEFIK_ENABLE}'
- 'traefik.http.routers.grafana.rule=Host(`${HOST}`)'
- 'traefik.http.routers.grafana.entrypoints=web,websecure'
- traefik.http.routers.grafana.service=grafana
- traefik.http.routers.grafana.tls=true
- 'traefik.http.routers.grafana.tls.certresolver=${CERT_RESOLVER}'
- 'traefik.http.services.grafana.loadbalancer.server.port=${PORT}'
networks:
default:
aliases:
- loki
- grafana
logging:
options:
max-size: 10m
Expand All @@ -199,9 +199,9 @@ services:
condition: any
resources:
reservations:
memory: 256M
memory: 128M
limits:
memory: 800M
memory: 512M
beszel:
image: 'henrygd/beszel:0.18.8'
networks:
Expand Down
Loading
Loading