forked from data.coop/ansible
Merge branch 'reverseproxy' of data.coop/ansible into master
This commit is contained in:
commit
0493b51039
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,4 @@
|
||||||
playbook.retry
|
playbook.retry
|
||||||
*.sw*
|
*.sw*
|
||||||
|
.vagrant/
|
||||||
|
*.log
|
||||||
|
|
|
@ -2,7 +2,8 @@ version: "2.3"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
external: false
|
external_services:
|
||||||
|
external: true
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
|
@ -10,9 +11,12 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- USER_UID=1000
|
- USER_UID=1000
|
||||||
- USER_GID=1000
|
- USER_GID=1000
|
||||||
|
- VIRTUAL_HOST=gitea.local
|
||||||
|
- VIRTUAL_PORT=3000
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- gitea
|
- gitea
|
||||||
|
- external_services
|
||||||
volumes:
|
volumes:
|
||||||
- gitea:/data
|
- gitea:/data
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -8,11 +8,10 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=nextcloud
|
- POSTGRES_DB=nextcloud
|
||||||
- POSTGRES_USER=nextcloud
|
- POSTGRES_USER=nextcloud
|
||||||
|
networks:
|
||||||
|
- nextcloud
|
||||||
app:
|
app:
|
||||||
image: nextcloud
|
image: nextcloud
|
||||||
ports:
|
|
||||||
- 8080:80
|
|
||||||
volumes:
|
volumes:
|
||||||
- nextcloud:/var/www/html
|
- nextcloud:/var/www/html
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -21,8 +20,19 @@ services:
|
||||||
- POSTGRES_PASSWORD=hest
|
- POSTGRES_PASSWORD=hest
|
||||||
- POSTGRES_DB=nextcloud
|
- POSTGRES_DB=nextcloud
|
||||||
- POSTGRES_USER=nextcloud
|
- POSTGRES_USER=nextcloud
|
||||||
depends_on:
|
- VIRTUAL_HOST=nextcloud.local
|
||||||
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
ports:
|
||||||
|
- "80"
|
||||||
|
networks:
|
||||||
|
- nextcloud
|
||||||
|
- external_services
|
||||||
volumes:
|
volumes:
|
||||||
nextcloud:
|
nextcloud:
|
||||||
db:
|
db:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
external_services:
|
||||||
|
external: true
|
||||||
|
nextcloud:
|
16
roles/docker/files/composefiles/nginx-proxy.yml
Normal file
16
roles/docker/files/composefiles/nginx-proxy.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
---
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
nginx-proxy:
|
||||||
|
image: jwilder/nginx-proxy
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||||
|
networks:
|
||||||
|
- external_services
|
||||||
|
container_name: nginx-proxy
|
||||||
|
networks:
|
||||||
|
external_services:
|
||||||
|
external: true
|
|
@ -1,3 +1,13 @@
|
||||||
|
- name: setup external services network
|
||||||
|
docker_network:
|
||||||
|
name: external_services
|
||||||
|
|
||||||
|
- name: setup nginx reverse proxy
|
||||||
|
docker_service:
|
||||||
|
project_name: nginx-proxy
|
||||||
|
definition:
|
||||||
|
"{{ lookup('file', 'composefiles/nginx-proxy.yml') | from_yaml }}"
|
||||||
|
|
||||||
- name: setup gitea
|
- name: setup gitea
|
||||||
docker_service:
|
docker_service:
|
||||||
project_name: gitea
|
project_name: gitea
|
||||||
|
|
Loading…
Reference in a new issue