https://github.com/thecreation/dockerize-traefik
https://github.com/thecreation/dockerize-traefik
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thecreation/dockerize-traefik
- Owner: thecreation
- Created: 2019-10-27T07:27:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-27T07:30:38.000Z (over 6 years ago)
- Last Synced: 2025-07-06T09:02:12.839Z (12 months ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dockerize Traefik
## Prerequisites
* [Docker](https://docs.docker.com/install/)
* [Docker Compose](https://docs.docker.com/compose/install/)
* [Traefik](https://docs.traefik.io/)
## Up and Running
1. Create a directory that will serve as the home for your docker services.
```sh
mkdir /data && cd /data
```
2. Clone this repo into the newly created directory as "reverse-proxy".
```sh
git clone https://github.com/thecreation/dockerize-traefik.git && cd reverse-proxy
```
3. Create `.env` file and modify the variables to fit your needs.
```sh
cp .env-example .env
vim .env
```
Update `TRAEFIK_AUTH` with the generated credentials below:
```sh
docker run \
--entrypoint htpasswd \
registry:latest -nb admin password
```
Fill the server ip to `TRAEFIK_IPWHITELIST` to restrict ip access.
4. Create "acme.json" and update file permissions.
```sh
touch letsencrypt/acme.json && chmod 600 letsencrypt/acme.json
```
5. Create the docker network.
```sh
docker network create reverse_proxy
```
6. Spin up the service.
```sh
docker-compose up -d
```
done!
## Web dashboard and ping
Access the links below in the browser
- https://proxy.localhost/dashboard
- https://proxy.localhost/ping
## Troubleshooting and logging
Run the following command:
```sh
tail -f logs/accessLog.txt
tail -v logs/traefik.log
```