Manifests/corum-fk/prod/corumfk.yml

157 lines
5.1 KiB
YAML

version: '3.8'
services:
corum-fk-landing:
image: ghcr.io/emrekirman/corum-fk-landing:latest
networks:
- traefik-public
- corum-fk-network
deploy:
replicas: 3
placement:
constraints:
- node.role == manager
restart_policy:
condition: on-failure
resources:
limits:
memory: 750M
labels:
- traefik.enable=true
- traefik.http.routers.cfklanding.rule=Host(`corumfk.com.tr`) || Host(`www.corumfk.com.tr`) || Host(`arcacorumfk.com.tr`) || Host(`www.arcacorumfk.com.tr`) || Host(`arcacorumfk.com`) || Host(`www.arcacorumfk.com`)
- traefik.http.routers.cfklanding.entrypoints=websecure
- traefik.http.routers.cfklanding.tls.certresolver=myresolver
- traefik.http.services.cfklanding.loadbalancer.server.port=3000
- traefik.http.routers.cfklanding.service=cfklanding
- traefik.http.middlewares.cfklanding-ratelimit.rateLimit.average=100
- traefik.http.middlewares.cfklanding-ratelimit.rateLimit.burst=200
- traefik.http.middlewares.cfklanding-ratelimit.rateLimit.period=1s
- traefik.http.routers.cfklanding.middlewares=cfklanding-ratelimit
corum-fk-agent:
image: ghcr.io/emrekirman/corum-fk-agent:latest
networks:
- corum-fk-network
- traefik-public
volumes:
- corum-fk-aget-sqlite:/database
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == manager
labels:
- traefik.enable=true
- traefik.http.routers.cfkagent.rule=Host(`agent.corumfk.com.tr`)
- traefik.http.routers.cfkagent.entrypoints=websecure
- traefik.http.routers.cfkagent.tls.certresolver=myresolver
- traefik.http.services.cfkagent.loadbalancer.server.port=3001
- traefik.http.routers.cfkagent.service=cfkagent
- traefik.http.middlewares.cfkagent-ratelimit.rateLimit.average=50
- traefik.http.middlewares.cfkagent-ratelimit.rateLimit.burst=100
- traefik.http.middlewares.cfkagent-ratelimit.rateLimit.period=1s
- traefik.http.routers.cfkagent.middlewares=cfkagent-ratelimit
corum-fk-redis:
image: redis:7.2
command: ["redis-server", "--requirepass", "98836", "--appendonly", "yes"]
networks:
- corum-fk-network
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == manager
corum-fk-postgres:
image: postgres:15
environment:
POSTGRES_USER: strapi
POSTGRES_PASSWORD: 98836
POSTGRES_DB: strapi
volumes:
- corum-fk-pg-data:/var/lib/postgresql/data
networks:
- corum-fk-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U strapi -d strapi"]
interval: 10s
timeout: 5s
retries: 10
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == manager
corum-fk-cms:
image: ghcr.io/emrekirman/corum-fk-cms:latest
environment:
NODE_ENV: production
PORT: 1337
HOST: 0.0.0.0
URL: https://admin.corumfk.com.tr
APP_KEYS: "WRxkPQhgXqEjAzWLkL9yog==,FpS2Gg8lEb0GxZ3tQ/Hvmg==,GmvGMto4RsuQBIZspiTw8A==,rGuTufvILVv1VDNptw2wbA=="
API_TOKEN_SALT: "RTCb/edPuv9u/wENFNhA/Q=="
ADMIN_JWT_SECRET: "IA8hDF3ynrGdwApm75G/fA=="
JWT_SECRET: "cw5em010OuItllNrh/AJpA=="
DATABASE_CLIENT: postgres
DATABASE_HOST: corum-fk-postgres
DATABASE_PORT: 5432
DATABASE_NAME: strapi
DATABASE_USERNAME: strapi
DATABASE_PASSWORD: 98836
DATABASE_SSL: "false"
PUBLIC_URL: https://admin.corumfk.com.tr
STRAPI_ADMIN_BACKEND_URL: https://admin.corumfk.com.tr
depends_on:
- corum-fk-postgres
volumes:
- corum-fk-cms-uploads:/public/uploads
networks:
- traefik-public
- corum-fk-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:1337/"]
interval: 120s
timeout: 5s
retries: 3
deploy:
replicas: 2
restart_policy:
condition: on-failure
resources:
limits:
memory: 2G
placement:
constraints:
- node.role == manager
labels:
- traefik.enable=true
- traefik.http.routers.cfkcms.rule=Host(`admin.corumfk.com.tr`)
- traefik.http.routers.cfkcms.entrypoints=websecure
- traefik.http.routers.cfkcms.tls.certresolver=myresolver
- traefik.http.services.cfkcms.loadbalancer.server.port=1337
- traefik.http.routers.cfkcms.service=cfkcms
- traefik.http.middlewares.cfkcms-ratelimit.rateLimit.average=40
- traefik.http.middlewares.cfkcms-ratelimit.rateLimit.burst=80
- traefik.http.middlewares.cfkcms-ratelimit.rateLimit.period=1s
- traefik.http.routers.cfkcms.middlewares=cfkcms-ratelimit
networks:
traefik-public:
external: true
corum-fk-network:
volumes:
corum-fk-pg-data:
corum-fk-strapi-uploads:
corum-fk-cms-uploads:
corum-fk-aget-sqlite: