Skip to content

Instantly share code, notes, and snippets.

@ginomessmer
Last active June 27, 2020 14:31
Show Gist options
  • Save ginomessmer/83fbfe7c385db4c299a76165df26aefb to your computer and use it in GitHub Desktop.
Save ginomessmer/83fbfe7c385db4c299a76165df26aefb to your computer and use it in GitHub Desktop.
Unidash Back-End Docker Stack
version: '3.4'
services:
gateway:
networks:
- traefik
- default
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.services.gateway.loadbalancer.server.port=80"
- "traefik.http.routers.gateway-secured.rule=Host(`${DOMAIN:-tinf18b4.dev.unidash.top}`)"
- "traefik.http.routers.gateway-secured.entrypoints=web-secured"
- "traefik.http.routers.gateway-secured.tls.certresolver=defaultlts"
auth:
networks:
- default
environment:
- "ConnectionStrings:AuthDbContext=Server=mssql, 1433;Database=Auth;User=sa;Password=${MSSQL_PW:-yourStrong!Password123};"
timetable:
networks:
- default
environment:
- "ConnectionStrings:TimeTableDbContext=Server=mssql, 1433;Database=TimeTable;User=sa;Password=${MSSQL_PW:-yourStrong!Password123};"
- "TimeTable:UpstreamICalUrl=${UD_TT_UPSTREAM_ICAL}"
canteen:
networks:
- default
chat:
networks:
- default
mssql:
networks:
- default
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=${MSSQL_PW:-yourStrong!Password123}
version: '3.4'
services:
traefik:
image: traefik
ports:
- "80:80"
- "443:443"
command:
- --api.insecure=true # set to 'false' on production
- --api.dashboard=true # see https://docs.traefik.io/v2.0/operations/dashboard/#secure-mode for how to secure the dashboard
- --api.debug=true # enable additional endpoints for debugging and profiling
- --log.level=DEBUG # debug while we get it working, for more levels/info see https://docs.traefik.io/observability/logs/
- --providers.docker=true
- --providers.docker.swarmMode=true
- --providers.docker.exposedbydefault=false
- --providers.docker.network=unidash_traefik
- --entrypoints.web.address=:80
- --entrypoints.web-secured.address=:443
- --certificatesresolvers.defaultlts.acme.httpChallenge.entrypoint=web
- --certificatesresolvers.defaultlts.acme.email=${LE_EMAIL_ADDRESS}
- --certificatesresolvers.defaultlts.acme.storage=/letsencrypt/acme.json
volumes:
- letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock
networks:
- traefik
deploy:
placement:
constraints:
- node.role == manager
labels:
- "traefik.enable=true"
- "traefik.http.services.api.loadbalancer.server.port=8080"
- "traefik.http.routers.api.rule=Host(`traefik.${DOMAIN}`)"
- "traefik.http.routers.api.entrypoints=web-secured"
- "traefik.http.routers.api.tls.certresolver=defaultlts"
networks:
traefik:
driver: overlay
volumes:
letsencrypt:
version: '3.4'
services:
gateway:
image: unidash/gateway
build:
context: .
dockerfile: Unidash.Gateway/Dockerfile
auth:
image: unidash/auth
build:
context: .
dockerfile: Unidash.Auth.Application/Dockerfile
depends_on:
- mssql
timetable:
image: unidash/timetable
build:
context: .
dockerfile: Unidash.TimeTable.Application/Dockerfile
depends_on:
- mssql
canteen:
image: unidash/canteen
build:
context: .
dockerfile: Unidash.Canteen.Application/Dockerfile
chat:
image: unidash/chat
build:
context: .
dockerfile: Unidash.Chat.Application/Dockerfile
mongodb:
image: mongo
volumes:
- mongodb_data:/data/db
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
volumes:
- mssql:/var/opt/mssql
rabbitmq:
image: rabbitmq:3
volumes:
mongodb_data:
mssql:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment