Compare commits
6 Commits
63834d48d3
...
testing
Author | SHA1 | Date | |
---|---|---|---|
|
6212b71a33 | ||
|
fff1d109f3 | ||
|
85036f6122 | ||
|
8b64cb2490 | ||
|
bacad5a70c | ||
|
2f7a8b7fe2 |
5
.env.sample
Normal file
5
.env.sample
Normal file
@@ -0,0 +1,5 @@
|
||||
PROJECT_URL=portainer.localhost
|
||||
|
||||
PROJECT_NAME=sample
|
||||
|
||||
TRAEFIK_NETWORK=traefik_net
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.env
|
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 a2g_dockerized
|
||||
Copyright (c) 2023 altogether
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
23
README.md
23
README.md
@@ -1,2 +1,25 @@
|
||||
# traefik_portainer
|
||||
|
||||
## get started
|
||||
|
||||
you will need a .env file
|
||||
|
||||
sample .env:
|
||||
|
||||
# .env
|
||||
|
||||
|
||||
PROJECT_URL=portainer.localhost
|
||||
PROJECT_NAME=sample
|
||||
|
||||
TRAEFIK_NETWORK=traefik_net
|
||||
|
||||
|
||||
|
||||
then execute init with
|
||||
|
||||
./init
|
||||
|
||||
|
||||
now the portainer installation should be accessable: https://${PROJECT_URL}
|
||||
if you use the sample .env: https://portainer.localhost
|
||||
|
31
docker-compose.yml
Normal file
31
docker-compose.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
version: '3.8'
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: "${TRAEFIK_NETWORK}"
|
||||
external: true
|
||||
|
||||
services:
|
||||
portainer:
|
||||
image: "portainer/portainer-ce:alpine"
|
||||
container_name: "${PROJECT_NAME}_portainer"
|
||||
hostname: "${PROJECT_URL}"
|
||||
command: "-H unix:///var/run/docker.sock"
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
- "data:/data"
|
||||
restart: always
|
||||
labels:
|
||||
# Watchtower add to auto update
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
# traefik
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=${TRAEFIK_NETWORK}"
|
||||
- "traefik.http.routers.${PROJECT_NAME}_portainer.rule=Host(`${PROJECT_URL}`)"
|
||||
- "traefik.http.routers.${PROJECT_NAME}_portainer.entrypoints=websecure"
|
||||
- "traefik.http.routers.${PROJECT_NAME}_portainer.tls=true"
|
||||
- "traefik.http.services.${PROJECT_NAME}_portainer.loadbalancer.server.port=9000"
|
||||
|
||||
volumes:
|
||||
data:
|
||||
name: "${PROJECT_NAME}-portainer-data"
|
Reference in New Issue
Block a user