Skip to content

Commit

Permalink
Merge pull request #4 from Diesel-Net/development
Browse files Browse the repository at this point in the history
Promotion
  • Loading branch information
tomdaley92 authored May 28, 2021
2 parents 55a414f + 50393df commit 8f38fe3
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 53 deletions.
7 changes: 5 additions & 2 deletions .ansible/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

- hosts: tools
strategy: linear

tasks:

- import_role:
- include_role:
name: common
tasks_from: make_data_dir

- include_role:
name: docker_deploy
10 changes: 0 additions & 10 deletions .ansible/group_vars/all/drone.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions .ansible/group_vars/all/git.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions .ansible/group_vars/all/main.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
signups_allowed: no
signups_allowed: yes
admin_token: admin
3 changes: 1 addition & 2 deletions .ansible/inventory/development/group_vars/tools/proxy.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
proxy_domains:
- bitwarden.dev.diesel.net
proxy_domain: bitwarden.dev.diesel.net
3 changes: 1 addition & 2 deletions .ansible/inventory/production/group_vars/tools/proxy.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
proxy_domains:
- bitwarden.diesel.net
proxy_domain: bitwarden.diesel.net
7 changes: 6 additions & 1 deletion .ansible/roles/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
- name: docker_deploy
scm: git
src: "[email protected]:Diesel-Net/ansible-role-docker-deploy.git"
version: "1.0.3"
version: 1.1.0

- name: common
scm: git
src: "[email protected]:Diesel-Net/ansible-role-common.git"
version: 1.0.0
16 changes: 8 additions & 8 deletions .ansible/templates/docker-compose.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@ services:
image: bitwardenrs/server:latest
volumes:
- /etc/localtime:/etc/localtime
- /etc/ssl/certs/:/etc/ssl/certs/
- {{ directories_data }}:/data/
- {{ ssl_cert_dir }}:/etc/ssl/certs/
- {{ data_dir }}:/data/
environment:
- SIGNUPS_ALLOWED={{ signups_allowed | string | lower }}
- ADMIN_TOKEN={{ admin_token }}
- DOMAIN=https://{{ proxy_domains[0] }}
- DOMAIN=https://{{ proxy_domain }}
deploy:
labels:
- traefik.enable=true
- traefik.docker.network=traefik
- traefik.docker.network={{ docker_network }}
- traefik.http.middlewares.redirect-https.redirectScheme.scheme=https
- traefik.http.middlewares.redirect-https.redirectScheme.permanent=true
- traefik.http.routers.bitwarden-ui-https.rule=Host(`{{ proxy_domains | join('`,`') }}`)
- traefik.http.routers.bitwarden-ui-https.rule=Host(`{{ proxy_domain }}`)
- traefik.http.routers.bitwarden-ui-https.entrypoints=websecure
- traefik.http.routers.bitwarden-ui-https.tls=true
- traefik.http.routers.bitwarden-ui-https.service=bitwarden-ui
- traefik.http.routers.bitwarden-ui-http.rule=Host(`{{ proxy_domains | join('`,`') }}`)
- traefik.http.routers.bitwarden-ui-http.rule=Host(`{{ proxy_domain }}`)
- traefik.http.routers.bitwarden-ui-https.tls.certresolver=step-ca
- traefik.http.routers.bitwarden-ui-http.entrypoints=web
- traefik.http.routers.bitwarden-ui-http.middlewares=redirect-https
- traefik.http.routers.bitwarden-ui-http.service=bitwarden-ui
- traefik.http.services.bitwarden-ui.loadbalancer.server.port=80
- traefik.http.routers.bitwarden-websocket-https.rule=Host(`{{ proxy_domains | join('`,`') }}`) && Path(`/notifications/hub`)
- traefik.http.routers.bitwarden-websocket-https.rule=Host(`{{ proxy_domain }}`) && Path(`/notifications/hub`)
- traefik.http.routers.bitwarden-websocket-https.entrypoints=websecure
- traefik.http.routers.bitwarden-websocket-https.tls=true
- traefik.http.routers.bitwarden-websocket-https.service=bitwarden-websocket
- traefik.http.routers.bitwarden-websocket-http.rule=Host(`{{ proxy_domains | join('`,`') }}`) && Path(`/notifications/hub`)
- traefik.http.routers.bitwarden-websocket-http.rule=Host(`{{ proxy_domain }}`) && Path(`/notifications/hub`)
- traefik.http.routers.bitwarden-websocket-http.entrypoints=web
- traefik.http.routers.bitwarden-websocket-http.middlewares=redirect-https
- traefik.http.routers.bitwarden-websocket-http.service=bitwarden-websocket
Expand Down
3 changes: 3 additions & 0 deletions .drone.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

kind: pipeline
type: docker
name: development pipeline
Expand All @@ -25,7 +26,9 @@ trigger:
- development
event:
- push

---

kind: pipeline
type: docker
name: production pipeline
Expand Down

0 comments on commit 8f38fe3

Please sign in to comment.