Skip to content

chris-continuous/awesome-traefik

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome Traefik

INSTALLATION MULTI INSTANCE NEXTCLOUD

You must actually deploy it in a swarm cluster with managers.

docker swarm init
# and play command in outputs if you need more nodes

build your image locally:

docker build -t <name>-nextcloud:$IMAGE_VERSION ./nextcloud/custom-image

OR install your own private registry : doc here
exemple files are in registry directory.

build image on an other host and push it

docker build -t <reposityry_domain or host>/<name>-nextcloud:$IMAGE_VERSION ./nextcloud/custom-image
docker login
docker push <reposityry_domain or host>/<name>-nextcloud:$IMAGE_VERSION

Launch traefik stack.

docker stack deploy -c traefik/docker-compose.yaml <your stack name>

Copy deploy.sh.dist to deploy.sh.
execute :

sudo chmod +x deploy.sh

to deploy stacks complete deploy.sh.
for each nextcloud you want to deploy duplicate this piece of code:

export DB_HOST=<localhost or ip >
export STACK=<stack number or shortname>
export DB_NAME=mydb
export DB_USER=myuser
export DB_PASSWORD=12345
export NEXTCLOUD_URL=<main domain name>
export NEXTCLOUD_ADMIN_USER=admin
export NEXTCLOUD_ADMIN_PASSWORD=mypassword
export STACK_NAME=<unique stack name>
export NEXTCLOUD_INSTANCE_PATH=<path to route traefik on the right instance>
export IMAGE_VERSION=<image version to build and use>

# add flag --with-registry-auth if you use a private registry
docker stack deploy -c ./nextcloud/docker-compose.yaml $STACK_NAME

finally on your manager execute you deploy.sh.

ORIGINAL READ ME

Welcome to Awesome Traefik, a collection of contributions around Traefik and Docker/Docker-Compose.

These samples provide a starting point for how to integrate different services using a Compose file and to manage their deployment with Docker Compose and Traefik.

Getting started

These instructions will get you through the bootstrap phase of creating and deploying samples of containerized applications with Docker Compose and Traefik.

Prerequisites

Launch Traefik

  • It is also necessary to launch an instance of Traefik beforehand. You can find the docker-compose file here :
    • Traefik HTTPS with let's encrypt, ssl redirection and by default some security headers: Launch Traefik

Running a sample

The root directory of each sample contains the docker-compose.yaml which describes the configuration of service components. All samples can be run in a local environment by going into the root directory of each one and executing:

docker-compose up -d

Check the README.md of each sample to get more details on the structure and what is the expected output. To stop and remove the all containers of the sample application run:

docker-compose down

Contribute

We welcome examples that help people understand how to use Traefik with Docker Compose for common applications.

About

Welcome to Awesome Traefik, a collection of contributions around Traefik.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 93.6%
  • PHP 4.2%
  • Dockerfile 2.2%