Skip to content

Commit

Permalink
Simplify docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Feb 18, 2024
1 parent 5053ab5 commit 876b2e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 63 deletions.
1 change: 0 additions & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ services:
- CLICKHOUSE_USER=somsiad
- CLICKHOUSE_PASSWORD=somsiad
- REDIS_URL=redis://redis:6379/
- GPT_AUTHORIZED_SERVERS=294182757209473024,479458694354960385,682561082719731742
web:
build: web
depends_on:
Expand Down
66 changes: 4 additions & 62 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,10 @@ version: "3.8"
volumes:
clickhouse-persistence:
services:
clickhouse:
build:
context: .
dockerfile: clickhouse/Dockerfile
environment:
- CLICKHOUSE_DB=somsiad
- CLICKHOUSE_USER=somsiad
- CLICKHOUSE_PASSWORD
ports:
- "8123:8123"
- "9000:9000"
volumes:
- clickhouse-persistence:/var/lib/clickhouse
redis:
image: redis:alpine
bot:
build: .
restart: on-failure
stop_grace_period: 20s
depends_on:
- clickhouse
- redis
links:
- clickhouse:clickhouse
- redis:redis
extra_hosts:
- host.docker.internal:host-gateway
environment:
Expand All @@ -45,44 +24,7 @@ services:
- SENTRY_AUTH_TOKEN
- SENTRY_ORG
- DATABASE_URL
- CLICKHOUSE_URL=http://clickhouse:8123
- CLICKHOUSE_USER=somsiad
- CLICKHOUSE_PASSWORD=somsiad
- REDIS_URL=redis://redis:6379/
- GPT_AUTHORIZED_SERVERS=294182757209473024,479458694354960385,682561082719731742
web:
build: web
depends_on:
- redis
links:
- redis:redis
environment:
- REDIS_URL=redis://redis:6379/
labels:
- traefik.enable=true
- traefik.http.routers.web.rule=Host(`somsiad.net`)
- traefik.http.routers.web.entrypoints=websecure
- traefik.http.routers.web.tls=true
- traefik.http.routers.web.tls.certresolver=le
router:
image: "traefik:v2.4"
depends_on:
- web
command:
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.http.redirections.entryPoint.to=websecure
- --entrypoints.web.http.redirections.entryPoint.scheme=https
- --entrypoints.web.http.redirections.entrypoint.permanent=true
- --certificatesresolvers.le.acme.httpchallenge=true
- --certificatesresolvers.le.acme.httpchallenge.entrypoint=web
- --certificatesresolvers.le.acme.email=dev@twixes.com
- --certificatesresolvers.le.acme.storage=/letsencrypt/acme.json
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./letsencrypt:/letsencrypt"
- CLICKHOUSE_URL
- CLICKHOUSE_USER
- CLICKHOUSE_PASSWORD
- REDIS_URL

0 comments on commit 876b2e1

Please sign in to comment.