Working setup
This commit is contained in:
@@ -37,18 +37,10 @@ services:
|
||||
# HTTP EntryPoint
|
||||
- "--entrypoints.web.address=:80"
|
||||
|
||||
# Configure HTTP to HTTPS Redirection
|
||||
# - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
|
||||
# - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
|
||||
# - "--entrypoints.web.http.redirections.entrypoint.permanent=true"
|
||||
|
||||
# HTTPS EntryPoint
|
||||
- "--entrypoints.websecure.address=:443"
|
||||
- "--entrypoints.websecure.http.tls=true"
|
||||
|
||||
# Attach dynamic TLS file
|
||||
# - "--providers.file.filename=/dynamic/tls.yaml"
|
||||
|
||||
# Providers
|
||||
|
||||
# Enable the Docker Swarm provider (instead of Docker provider)
|
||||
@@ -95,13 +87,10 @@ services:
|
||||
- "traefik.http.routers.dashboard.service=api@internal"
|
||||
- "traefik.http.routers.dashboard.tls=false"
|
||||
|
||||
# Basic‑auth middleware
|
||||
# - "traefik.http.middlewares.dashboard-auth.basicauth.users=<PASTE_HASH_HERE>"
|
||||
# - "traefik.http.routers.dashboard.middlewares=dashboard-auth@swarm"
|
||||
|
||||
# Service hint
|
||||
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
|
||||
|
||||
|
||||
# Deploy the Whoami application
|
||||
whoami:
|
||||
image: traefik/whoami
|
||||
@@ -128,4 +117,4 @@ services:
|
||||
networks:
|
||||
traefik_proxy:
|
||||
driver: overlay
|
||||
# attachable: true
|
||||
# attachable: true
|
||||
|
||||
@@ -5,10 +5,18 @@
|
||||
roles:
|
||||
|
||||
tasks:
|
||||
- name: Upload Prometheus configuration
|
||||
copy:
|
||||
src: files/prometheus.yml
|
||||
dest: ~/prometheus.yml
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Deploy myappstack stack from compose file
|
||||
community.docker.docker_stack:
|
||||
name: myappstack
|
||||
state: present
|
||||
prune: true
|
||||
compose:
|
||||
- "{{ lookup('file', 'files/docker-compose.yml') | from_yaml }}"
|
||||
- "{{ lookup('file', 'files/docker-compose.yml') | from_yaml }}"
|
||||
|
||||
Reference in New Issue
Block a user