Skip to content

Commit

Permalink
fix: add traefik to docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
NishaSharma14 committed Jun 15, 2023
1 parent a2c70e6 commit 4161552
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
version: "3.8"

services:
web:
container_name: chem-py-microservice
image: caffeinejena/cheminfo-microservice:latest
traefik:
image: traefik:v2.10
command:
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
ports:
- "8080:80"
- 80:80
- 8080:8080 # Optional: Expose Traefik dashboard on port 8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock

web:
image: caffeinejena/cheminfo-microservice:dev-latest
labels:
- "traefik.enable=true"
- "traefik.http.routers.web.rule=Host(`nfdi4chem-oss1-vm11.ianchm.uni-jena.de`)"
- "traefik.http.routers.web.entrypoints=web"
- "traefik.http.services.web.loadbalancer.server.port=80"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/latest/chem"]
interval: 1m
timeout: 10s
retries: 10
start_period: 40s

prometheus:
image: prom/prometheus
container_name: prometheus
Expand Down

0 comments on commit 4161552

Please sign in to comment.