Changed to label based config
Removed traefik.yml in favor of label based configuration and changed hosts to moxietest
This commit is contained in:
parent
8787722c6c
commit
f04f3acc58
@ -13,7 +13,7 @@
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
- name: Install Moxie Server
|
||||
hosts: all
|
||||
hosts: moxietest
|
||||
become: true
|
||||
|
||||
# Install host requirements for playbooks
|
||||
|
@ -1,18 +1,12 @@
|
||||
- name: Install Traefik Configuration
|
||||
template:
|
||||
src: traefik.yml
|
||||
dest: traefik.yml
|
||||
notify: Restart Traefik container
|
||||
|
||||
- name: Start Traefik container
|
||||
docker_container:
|
||||
name: "{{ traefik_name }}"
|
||||
image: traefik:{{ traefik_version }}
|
||||
command: --api.insecure=true --providers.docker
|
||||
state: started
|
||||
restart_policy: always
|
||||
ports:
|
||||
- "{{ traefik_port }}:80"
|
||||
- "{{ traefik_admin_port }}:8080"
|
||||
volumes:
|
||||
- ./traefik.yml:/etc/traefik/traefik.yml
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
@ -1,8 +0,0 @@
|
||||
# Docker configuration backend
|
||||
providers:
|
||||
docker:
|
||||
defaultRule: "Host(`{{'{{'}} trimPrefix `/` .Name }}.{{ traefik_domain }}`)"
|
||||
|
||||
# API and dashboard configuration
|
||||
api:
|
||||
insecure: true
|
@ -16,6 +16,8 @@
|
||||
image: wordpress:{{ wordpress_version }}
|
||||
restart_policy: always
|
||||
volumes: wordpress:/var/www/html
|
||||
labels:
|
||||
traefik.http.routers.wordpress.rule: "Host(`{{ wordpress_domain }}`)"
|
||||
links:
|
||||
- "{{ mariadb_name }}"
|
||||
env:
|
||||
|
Loading…
Reference in New Issue
Block a user