From 708c6cbb24741bc14a09d8e5a4ec0e33a67bbaf9 Mon Sep 17 00:00:00 2001 From: Ian Falatik <63957260+ifalatik@users.noreply.github.com> Date: Sat, 23 Nov 2024 17:55:43 +0100 Subject: [PATCH] link to example traefik deployment --- roles/project_deployment/README.md | 66 +----------------------------- 1 file changed, 1 insertion(+), 65 deletions(-) diff --git a/roles/project_deployment/README.md b/roles/project_deployment/README.md index 04313f4..7210f0a 100644 --- a/roles/project_deployment/README.md +++ b/roles/project_deployment/README.md @@ -136,68 +136,4 @@ None Example Playbook ---------------- -Example deployment of [traefik](https://github.com/traefik/traefik-library-image). - -This would require for the files `traefik.yml`, `dynamic/dynamic_conf.yml` and the directory `certs`, including a certificate for SSL to exists under this playbook's base directory + `/docker-project-deployment/` + (`files/traefik/` || `templates/traefik/` || `host_files/{{ inventory_hostname }}/traefik/`). - -```yaml -- hosts: all - - vars: - project_deployment_projects: - traefik: - docker_compose_file_version: "3" - services: - docker-proxy: - image: "tecnativa/docker-socket-proxy" - container_name: "docker-proxy" - privileged: true - networks: ["docker-proxy"] - mem_limit: "128m" - environment: ["CONTAINERS=1"] - volumes: ["/var/run/docker.sock:/var/run/docker.sock"] - healthcheck: - test: "wget --quiet -O/dev/null http://localhost:2375/containers/json?limit=1" - interval: "10s" - timeout: "3s" - retries: 10 - restart: unless-stopped - traefik: - image: "traefik" - container_name: "traefik" - command: "-c /etc/traefik/traefik.yml" - networks: ["traefik", "docker-proxy"] - depends_on: ["docker-proxy"] - volumes: - - "/etc/timezone:/etc/timezone" - - "/etc/localtime:/etc/localtime" - - "./traefik.yml:/etc/traefik/traefik.yml" - - "./dynamic/:/etc/traefik/dynamic/" - - "./certs:/certs:ro" - labels: - - "traefik.enable=true" - - "traefik.http.routers.dashboard.rule=Host(`{{ ansible_host) }}`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))" - - "traefik.http.routers.dashboard.service=api@internal" - - "traefik.http.routers.dashboard.entrypoints=web,websecure" - - "traefik.http.routers.dashboard.tls=true" - ports: - - "80:80" - - "443:443" - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "3" - restart: unless-stopped - networks: - traefik: - external: true - docker-proxy: - regex_secret_remote_paths: - - '.*/certs.*' - # don't restart service when dynamic configuration changes - regex_ignore_changes_remote_paths: ['.*/dynamic_conf\.yml$'] - - roles: - - role: ifalatik.docker.project_deployment -``` +Example deployment of [traefik](https://github.com/traefik/traefik-library-image) to an EC2 instance can be found [here](https://github.com/ifalatik/ec2-traefik-demo).