Created
May 23, 2020 18:56
-
-
Save Yatekii/c955f7a63a654c3d4cbaf1d45bd63d3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
networks: | |
$CI_ENVIRONMENT_SLUG-net: | |
volumes: | |
cache: | |
services: | |
static: | |
image: "$CI_REGISTRY_IMAGE/static:$CI_COMMIT_BRANCH" | |
container_name: "$CI_ENVIRONMENT_SLUG-static" | |
networks: | |
- $CI_ENVIRONMENT_SLUG-net | |
environment: | |
- NGINX_PORT=8080 | |
volumes: | |
- cache:/var/cache/nginx | |
labels: | |
- "traefik.http.routers.$CI_ENVIRONMENT_SLUG-static.rule=Host(`$CI_ENVIRONMENT_SLUG.xyz.ch`) && Path(`/static`)" | |
- "traefik.http.services.$CI_ENVIRONMENT_SLUG.loadbalancer.server.port=8080" | |
- "traefik.docker.network=$CI_ENVIRONMENT_SLUG-net" | |
- "traefik.enable=true" | |
- "traefik.default.protocol=http" | |
restart: "always" | |
tty: yes | |
stdin_open: true | |
app: | |
image: "$CI_REGISTRY_IMAGE/app:$CI_COMMIT_BRANCH" | |
container_name: "$CI_ENVIRONMENT_SLUG-app" | |
networks: | |
- $CI_ENVIRONMENT_SLUG-net | |
environment: | |
- "PORT=5000" | |
labels: | |
- "traefik.http.routers.$CI_ENVIRONMENT_SLUG-app.rule=Host(`$CI_ENVIRONMENT_SLUG.xyz.ch`)" | |
- "traefik.http.services.$CI_ENVIRONMENT_SLUG.loadbalancer.server.port=5000" | |
- "traefik.docker.network=$CI_ENVIRONMENT_SLUG-net" | |
- "traefik.enable=true" | |
- "traefik.default.protocol=http" | |
restart: "always" | |
tty: yes | |
stdin_open: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment