add traefik labels

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2019-07-26 12:41:54 +08:00
parent 0b39b1e1a4
commit e997d027d1
2 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,7 @@ drone_version: "latest"
drone_agents_enabled: "true"
drone_logs_pretty: "true"
drone_logs_color: "true"
drone_server_host: "http://localhost:8080"
drone_rpc_server: "http://drone-server"
drone_runner_capacity: "3"
drone_host_port: "8080"

View File

@ -48,6 +48,12 @@
volumes:
- "{{ drone_sqlite_dir }}:/data"
env_file: /etc/drone/drone-server.env
labels:
- "traefik.docker.network=web"
- "traefik.enable=true"
- "traefik.basic.frontend.rule=Host:{{ drone_server_host }}"
- "traefik.basic.port=80"
- "traefik.basic.protocol=http"
when: ((drone_server_config is defined and drone_server_config.changed) or
(drone_sqlite_folder is defined and drone_sqlite_folder.changed)) and
drone_database_driver == "sqlite"