Created
January 21, 2019 04:23
-
-
Save majerus1223/eb7dd65d68661289f0dbfe9b11235f4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#creates the Traefik container, make sure this is in a folder named Traefik. Also be sure to add the toml file in the same directory. | |
version: '3' | |
services: | |
reverse-proxy: | |
image: traefik # The official Traefik docker image | |
#build: ./traefik-library-image/alpine # This is for some lets encrypt dns cert shenanigans, you can probably just pull the image. | |
command: | |
- "--debug" # I dont think i need that, might want to remove it | |
ports: | |
- "80:80" | |
- "443:443" | |
- "8080:8080" # The Web UI (enabled by `api`) | |
container_name: traefik | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events | |
- ./traefik.toml:/etc/traefik/traefik.toml | |
# - ./acme:/acme # Cert generation stuf | |
# - ./namesilo-dns.sh:/namesilo-dns.sh # <-- this too | |
#environment: | |
# - EXEC_PATH=/namesilo-dns.sh # <-- and this | |
networks: | |
- proxy | |
# - traefik_proxy | |
networks: | |
proxy: | |
driver: bridge # Isn't that the default?46 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Creates the Gitea container, add to folder called Gitea and name the file docker-compose.yml | |
version: "2" # should probably be 3 | |
services: | |
server: | |
image: gitea/gitea:latest | |
restart: always | |
networks: | |
- traefik_proxy | |
- default | |
volumes: | |
- ./gitea:/data | |
ports: | |
# - "3000:3000" # Serves on port 3000 by default, but dont expose it cause we're using traefic. | |
- "222:22" # Change if you're already running ssh on port 22 (or change your regular ssh port). | |
labels: | |
- "traefik.enable=true" | |
- "traefik.port=3000" # Which port the container serves on, usually 80 but not for gitea. | |
- "traefik.frontend.rule=Host:git.YOURDOMAINHERE.COM" # Subdomain to use, change for each service. | |
networks: | |
traefik_proxy: | |
external: true # IMPORTANT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Super basic just straight up http | |
defaultEntryPoints = ["http", "https"] # These are added to every route automatically | |
[entryPoints] | |
[entryPoints.http] | |
address = ":80" | |
[docker] | |
domain = "utek.co" | |
watch = true # Auto aply new settings from lables | |
exposedbydefault = false # will expose every container automatically if true. | |
network = "traefik_proxy" # the network joining traefic and your containers | |
[api] | |
# Name of the related entry point | |
# | |
# Optional | |
# Default: "traefik" | |
# | |
entryPoint = "traefik" | |
# Enable Dashboard | |
#defaultEntryPoints = ["http", "https"] # These are added to every route automatically | |
[entryPoints] | |
[entryPoints.http] | |
address = ":80" | |
[docker] | |
domain = "YOURDOMAINHERE.COM" | |
watch = true # Auto aply new settings from lables | |
exposedbydefault = false # will expose every container automatically if true. | |
network = "traefik_proxy" # the network joining traefic and your containers | |
[api] | |
# Name of the related entry point | |
# | |
# Optional | |
# Default: "traefik" | |
# | |
entryPoint = "traefik" | |
# Enable Dashboard | |
# | |
# Optional | |
# Default: true | |
# | |
dashboard = true | |
# Enable debug mode. | |
# This will install HTTP handlers to expose Go expvars under /debug/vars and | |
# pprof profiling data under /debug/pprof/. | |
# Additionally, the log level will be set to DEBUG. | |
# | |
# Optional | |
# Default: false | |
# | |
debug = false | |
# Optional | |
# Default: true | |
# | |
dashboard = true | |
# Enable debug mode. | |
# This will install HTTP handlers to expose Go expvars under /debug/vars and | |
# pprof profiling data under /debug/pprof/. | |
# Additionally, the log level will be set to DEBUG. | |
# | |
# Optional | |
# Default: false | |
# | |
debug = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment