{"id":15323093,"url":"https://github.com/darkweak/workshopcontainous","last_synced_at":"2025-04-15T02:50:18.194Z","repository":{"id":39341753,"uuid":"210336160","full_name":"darkweak/WorkshopContainous","owner":"darkweak","description":"This repository is a step by step project to include Traefik into API Platform and secure it with fail2ban container linked to traefik instance","archived":false,"fork":false,"pushed_at":"2023-01-04T12:40:48.000Z","size":4085,"stargazers_count":14,"open_issues_count":46,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T14:38:59.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darkweak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security/.env","support":null}},"created_at":"2019-09-23T11:18:44.000Z","updated_at":"2024-04-03T15:50:43.000Z","dependencies_parsed_at":"2023-02-02T12:46:40.881Z","dependency_job_id":null,"html_url":"https://github.com/darkweak/WorkshopContainous","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkweak%2FWorkshopContainous","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkweak%2FWorkshopContainous/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkweak%2FWorkshopContainous/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkweak%2FWorkshopContainous/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darkweak","download_url":"https://codeload.github.com/darkweak/WorkshopContainous/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997087,"owners_count":21195797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T09:18:57.569Z","updated_at":"2025-04-15T02:50:18.178Z","avatar_url":"https://github.com/darkweak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Træfik 2.0 into API Platform\n\n[Introduction](#introduction)  \n[Factorization P1](#factorization-p1)  \n[Multiple instances](#multiple-instances)  \n[Factorization P2](#factorization-p2)  \n[Scaling](#scaling)  \n[Security](#security-\u0026-ssl)  \n\n## Introduction\n|  Folder source  |  Folder solution  |\n|:---:|:---:|\n|[introduction](introduction)|[factorization-p1](factorization-p1)|\n\nIn this part, we are starting from API Platform plain base to \nimplement functional basic traefik instance\n\n## Factorization P1\n|  Folder source  |  Folder solution  |\n|:---:|:---:|\n|[factorization-p1](factorization-p1)|[multiple-instances](multiple-instances)|\n\nTake back our modifications from this part located in `factorization-p1`\nfolder to factorise our setup to edit less things that will be shared to\nmany labels\n\n## Multiple instances\n|  Folder source  |  Folder solution  |\n|:---:|:---:|\n|[multiple-instance](multiple-instances)|[factorization-p2](factorization-p2)|\n\nUse only one instance of API Platform is so sad, so, in this part we will\nuse one shared træfik instance with many API Platform instances. It will\nwork with many other docker-compose duplication containers using same ports\n\nTo handle that, we will deal with networks docker-compose clusterisation.  \nFrom now Træfik instance will only be into [external folder](external)\n\n## Factorization P2\n|  Folder source  |  Folder solution  |\n|:---:|:---:|\n|[factorization-p2](factorization-p2)|[scaling](scaling)|\n\nSetup regex to resolve multiple subdomains and domains and manage \napplications from .env\n\n## Scaling\n|  Folder source  |  Folder solution  |\n|:---:|:---:|\n|[scaling](scaling)|[security](security)|\n\nIf you have to deploy more than one instance of one service, you should use\n`scale` docker swarm command instead of duplicate your app. Then it will \nintroduce a very cool thing : `load-balancing` by Træefik  \nThis load-balancing is incremental modulo load-balancing so, you don't have\nlogic behind this but in many apps it should be ok. In bigger app you should\nuse kubernetes orchestration to handle the load-balancing  \nWe will use a whoami container built by Emile Vauge, it's a lightweight\ngo server container then after implement it, launched it, scale it doing\n```bash\ndocker-compose up -d --scale whoami=3\n```\njust curl whoami.domain.com to bypass browser cache and you'll see the IP\nwill load balance into 3 different IPs\n\n## Security \u0026 SSL\n|  Folder source  |  Folder solution  |\n|:---:|:---:|\n|[security](security)|[final](final)|\n\nSetup fail2ban linked to Traefik and other containers and central logging.  \nThen setup SSL (working on production only) using Let's Encrypt Authority X3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkweak%2Fworkshopcontainous","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkweak%2Fworkshopcontainous","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkweak%2Fworkshopcontainous/lists"}