Changed from using networks to links and basic formatting changes

This commit is contained in:
WilliamMiceli
2018-08-13 15:35:44 -04:00
parent c9297270d4
commit 5f3e9a48d1

View File

@@ -1,10 +1,8 @@
version: '2' version: '2'
services:
services:
nextcloud: nextcloud:
image: nextcloud:stable-apache image: nextcloud:stable-apache
depends_on: # Hopefully one day I'll upgrade to a rancher version that actually makes use of this. Here just for a future reminder.
- mysql
dns: dns:
- 1.1.1.1 - 1.1.1.1
- 1.0.0.1 - 1.0.0.1
@@ -16,7 +14,6 @@ services:
NEXTCLOUD_ADMIN_USER: ${NC_ADMIN} NEXTCLOUD_ADMIN_USER: ${NC_ADMIN}
NEXTCLOUD_ADMIN_PASSWORD: ${NC_ADMIN_PASS} NEXTCLOUD_ADMIN_PASSWORD: ${NC_ADMIN_PASS}
labels: labels:
# io.rancher.container.hostname_override: container_name
io.rancher.container.pull_image: always io.rancher.container.pull_image: always
{{- if (.Values.HOST_LABEL)}} {{- if (.Values.HOST_LABEL)}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
@@ -29,17 +26,16 @@ services:
traefik.backend: Nextcloud traefik.backend: Nextcloud
traefik.frontend.entryPoints: http,https traefik.frontend.entryPoints: http,https
traefik.docker.network: public traefik.docker.network: public
links:
- mysql
networks: networks:
- default - public-proxy
- nextcloud-nfs-net
- public
ports: ports:
- "${HOST_HTTP_PORT}:80" - "${HOST_HTTP_PORT}:80"
restart: on-failure restart: on-failure
volumes: volumes:
- Application:/var/www/html - Application:/var/www/html
- UserData:/var/www/html/data - UserData:/var/www/html/data
mysql: mysql:
image: mysql:5 image: mysql:5
dns: dns:
@@ -55,16 +51,14 @@ services:
{{- if (.Values.HOST_LABEL)}} {{- if (.Values.HOST_LABEL)}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}} {{- end}}
networks:
- nextcloud-nfs-net
restart: on-failure restart: on-failure
volumes: volumes:
- Database:/var/lib/mysql - Database:/var/lib/mysql
networks: networks:
nextcloud-nfs-net: public-proxy:
public:
external: true external: true
volumes: volumes:
Application: Application:
driver: rancher-nfs driver: rancher-nfs