139 lines
4.3 KiB
YAML
139 lines
4.3 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
|
||
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
|
||
corum-fk-agent:
|
||
image: ghcr.io/emrekirman/corum-fk-agent:latest
|
||
networks:
|
||
- corum-fk-network
|
||
- traefik-public
|
||
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
|
||
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
|
||
|
||
# --- NEW: PostgreSQL ---
|
||
corum-fk-postgres:
|
||
image: postgres:15
|
||
environment:
|
||
POSTGRES_USER: strapi
|
||
POSTGRES_PASSWORD: 98836 # değiştir
|
||
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
|
||
|
||
# --- NEW: Strapi ---
|
||
corum-fk-cms:
|
||
image: ghcr.io/emrekirman/corum-fk-cms:latest
|
||
environment:
|
||
NODE_ENV: production
|
||
# App
|
||
PORT: 1337
|
||
HOST: 0.0.0.0
|
||
URL: https://admin.corumfk.com.tr # Strapi'nin public URL'i
|
||
# Secrets (örnek değerler – değiştirin)
|
||
APP_KEYS: "WRxkPQhgXqEjAzWLkL9yog==,FpS2Gg8lEb0GxZ3tQ/Hvmg==,GmvGMto4RsuQBIZspiTw8A==,rGuTufvILVv1VDNptw2wbA=="
|
||
API_TOKEN_SALT: "RTCb/edPuv9u/wENFNhA/Q=="
|
||
ADMIN_JWT_SECRET: "IA8hDF3ynrGdwApm75G/fA=="
|
||
JWT_SECRET: "cw5em010OuItllNrh/AJpA=="
|
||
# Database (PostgreSQL)
|
||
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
|
||
placement:
|
||
constraints:
|
||
- node.role == manager
|
||
labels:
|
||
- traefik.enable=true
|
||
# Admin paneli ve Strapi'nin ihtiyaç duyduğu backend path'leri tek servise yönlendirilir.
|
||
- 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
|
||
|
||
networks:
|
||
traefik-public:
|
||
external: true
|
||
corum-fk-network:
|
||
|
||
volumes:
|
||
corum-fk-pg-data:
|
||
corum-fk-strapi-uploads:
|
||
corum-fk-cms-uploads: |