-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-swarm.yaml
More file actions
71 lines (68 loc) · 1.91 KB
/
Copy pathdocker-compose-swarm.yaml
File metadata and controls
71 lines (68 loc) · 1.91 KB
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
69
70
71
version: "3.8"
services:
nginx:
image: ghcr.io/cssnr/docker-nginx-proxy:latest
environment:
SERVICE_NAME: "app"
SERVICE_PORT: "3000"
BASIC_AUTH: ${BASIC_AUTH}
deploy:
replicas: 1
resources:
limits:
cpus: "1.0"
memory: 64M
labels:
- "traefik.enable=true"
- "traefik.http.routers.${STACK_NAME?err}.rule=Host(`${TRAEFIK_HOST?err}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=https"
- "traefik.http.routers.${STACK_NAME}.tls=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
#- "traefik.http.routers.${STACK_NAME}.tls.certresolver=le"
healthcheck:
test: ["CMD-SHELL", "curl -sf localhost:80/health-check || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
depends_on:
- app
networks:
- internal
- traefik-public
app:
image: cssnr/chat-server:${VERSION:-latest}
environment:
VERSION: ${VERSION}
STACK_NAME: ${STACK_NAME}
TRAEFIK_HOST: ${TRAEFIK_HOST}
MODEL: ${MODEL}
BASE_URL: ${BASE_URL}
PROVIDER_OPTIONS: ${PROVIDER_OPTIONS}
MAX_TOKENS: ${MAX_TOKENS}
INSTRUCTIONS: ${INSTRUCTIONS}
AI_SDK_LOG_WARNINGS: ${AI_SDK_LOG_WARNINGS}
CORS_ORIGINS: ${CORS_ORIGINS}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
OPENAI_API_KEY: ${OPENAI_API_KEY}
GOOGLE_GENERATIVE_AI_API_KEY: ${GOOGLE_GENERATIVE_AI_API_KEY}
PROVIDER_API_KEY: ${PROVIDER_API_KEY}
deploy:
replicas: 1
resources:
limits:
cpus: "2.0"
memory: 256M
#healthcheck:
# test: ["CMD-SHELL", "curl -sf localhost:3000/app-health-check || exit 1"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 30s
networks:
- internal
networks:
internal:
driver: overlay
traefik-public:
external: true