initial plugins
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
nextcloud:
|
||||
image: nextcloud
|
||||
container_name: mistborn_production_nextcloud
|
||||
env_file:
|
||||
- ../.envs/.production/.postgres
|
||||
- ../.envs/.production/.nextcloud
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.nextcloud-http.rule=Host(`nextcloud.mistborn`)"
|
||||
- "traefik.http.routers.nextcloud-http.entrypoints=web"
|
||||
- "traefik.http.routers.nextcloud-http.middlewares=mistborn_auth@file"
|
||||
- "traefik.http.routers.nextcloud-https.rule=Host(`nextcloud.mistborn`)"
|
||||
- "traefik.http.routers.nextcloud-https.entrypoints=websecure"
|
||||
- "traefik.http.routers.nextcloud-https.middlewares=mistborn_auth@file"
|
||||
- "traefik.http.routers.nextcloud-https.tls.certresolver=basic"
|
||||
- "traefik.http.services.nextcloud-service.loadbalancer.server.port=80"
|
||||
volumes:
|
||||
- ../../mistborn_volumes/extra/nextcloud:/var/www/html
|
||||
environment:
|
||||
- VIRTUAL_HOST=nextcloud.mistborn
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: mistborn_default
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# generate nextcloud .env files
|
||||
NEXTCLOUD_PROD_FILE="$1"
|
||||
#NEXTCLOUD_PASSWORD=$(python3 -c "import secrets; import string; print(f''.join([secrets.choice(string.ascii_letters+string.digits) for x in range(32)]))")
|
||||
NEXTCLOUD_PASSWORD="${MISTBORN_DEFAULT_PASSWORD}"
|
||||
echo "NEXTCLOUD_ADMIN_USER=mistborn" > $NEXTCLOUD_PROD_FILE
|
||||
echo "NEXTCLOUD_ADMIN_PASSWORD=$NEXTCLOUD_PASSWORD" >> $NEXTCLOUD_PROD_FILE
|
||||
echo "NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.mistborn" >> $NEXTCLOUD_PROD_FILE
|
||||
chmod 600 $NEXTCLOUD_PROD_FILE
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,9 @@
|
||||
[DEFAULT]
|
||||
name = nextcloud
|
||||
subdomain = nextcloud
|
||||
desc = Nextcloud is a suite of client-server software for creating and using file hosting services. Nextcloud application functionally is similar to Dropbox.
|
||||
img = img/nextcloud.png
|
||||
compose = compose/docker-compose.yml
|
||||
service = service/plugin.service
|
||||
environment = environment/environment.sh
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description=Mistborn Nextcloud Service
|
||||
Requires=Mistborn-base.service
|
||||
After=Mistborn-base.service
|
||||
PartOf=Mistborn-base.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=15
|
||||
User=root
|
||||
Group=docker
|
||||
PermissionsStartOnly=true
|
||||
# Shutdown container (if running) when unit is stopped
|
||||
ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh nextcloud docker-compose -f /opt/mistborn/extra/nextcloud.yml down
|
||||
|
||||
# Start container when unit is started
|
||||
ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh nextcloud docker-compose -f /opt/mistborn/extra/nextcloud.yml up --build
|
||||
# Stop container when unit is stopped
|
||||
ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh nextcloud docker-compose -f /opt/mistborn/extra/nextcloud.yml down
|
||||
# Post stop
|
||||
|
||||
[Install]
|
||||
WantedBy=Mistborn-base.service
|
||||
Reference in New Issue
Block a user