app-store/apps/nginx/docker-compose.yml
Stavros 19b277df94
feat(app-store): add nginx (#1691)
* feat(app-store): add nginx

* refactor(nginx): change image
2023-11-26 16:04:49 +02:00

35 lines
1.4 KiB
YAML

version: "3.9"
services:
nginx:
image: nginx:1.25.3
container_name: nginx
restart: unless-stopped
ports:
- ${APP_PORT}:80
networks:
- tipi_main_network
labels:
# Main
traefik.enable: true
traefik.http.middlewares.nginx-web-redirect.redirectscheme.scheme: https
traefik.http.services.nginx.loadbalancer.server.port: 80
# Web
traefik.http.routers.nginx-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.nginx-insecure.entrypoints: web
traefik.http.routers.nginx-insecure.service: nginx
traefik.http.routers.nginx-insecure.middlewares: nginx-web-redirect
# Websecure
traefik.http.routers.nginx.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.nginx.entrypoints: websecure
traefik.http.routers.nginx.service: nginx
traefik.http.routers.nginx.tls.certresolver: myresolver
# Local domain
traefik.http.routers.nginx-local-insecure.rule: Host(`nginx.${LOCAL_DOMAIN}`)
traefik.http.routers.nginx-local-insecure.entrypoints: web
traefik.http.routers.nginx-local-insecure.service: nginx
traefik.http.routers.nginx-local-insecure.middlewares: nginx-web-redirect
# Local domain secure
traefik.http.routers.nginx-local.rule: Host(`nginx.${LOCAL_DOMAIN}`)
traefik.http.routers.nginx-local.entrypoints: websecure
traefik.http.routers.nginx-local.service: nginx
traefik.http.routers.nginx-local.tls: true