commit
a46c7b8f02
@ -0,0 +1,19 @@ |
||||
# Global Settings |
||||
LOCAL_STACK_DIR=/srv/docker/volumes/nextcloud |
||||
|
||||
# Networks |
||||
NETWORK=webservices |
||||
|
||||
# nextcloud (optional) |
||||
NC_CONTAINER_NAME= |
||||
NC_RESTART= |
||||
MYSQL_HOST= |
||||
|
||||
# db |
||||
MYSQL_ROOT_PASSWORD= |
||||
|
||||
# db (optional) |
||||
DB_IMG= |
||||
DB_TAG= |
||||
DB_CONTAINER_NAME= |
||||
DB_RESTART= |
@ -0,0 +1 @@ |
||||
*.env |
@ -0,0 +1,16 @@ |
||||
FROM nextcloud:latest |
||||
|
||||
LABEL maintainer="Meliurwen <meliruwen@gmail.com>" |
||||
|
||||
# The line with `sed` command simply inserts the command `service cron start` |
||||
# at the second line of the `entrypoint.sh` file |
||||
RUN apt-get -q update && \ |
||||
apt-get -qq install \ |
||||
cron \ |
||||
nano-tiny && \ |
||||
echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\"" | crontab - && \ |
||||
sed -i '2 i\service cron start' /entrypoint.sh && \ |
||||
apt-get purge -y nano-tiny && \ |
||||
rm -rf /var/lib/apt/lists/* && \ |
||||
apt-get autoremove --purge && \ |
||||
apt-get clean |
@ -0,0 +1,36 @@ |
||||
version: "3" |
||||
|
||||
services: |
||||
nextcloud: |
||||
## Using Dockerfile because I want tu use 'cron' |
||||
## and I need to add it first to the pure image |
||||
#image: nextcloud:latest |
||||
build: . |
||||
container_name: ${NC_CONTAINER_NAME:-nextcloud} |
||||
restart: ${NC_RESTART:-unless-stopped} |
||||
depends_on: |
||||
- cloud-db |
||||
volumes: |
||||
- ${LOCAL_STACK_DIR}/nextcloud/data:/var/www/html |
||||
- /etc/timezone:/etc/timezone:ro |
||||
env_file: |
||||
- nextcloud.env |
||||
- nc_db.env |
||||
environment: |
||||
MYSQL_HOST: ${MYSQL_HOST:-nextcloud-db} |
||||
|
||||
db: |
||||
image: ${DB_IMG:-mariadb}:${DB_TAG:-latest} |
||||
container_name: ${DB_CONTAINER_NAME:-nextcloud-db} |
||||
restart: ${DB_RESTART:-unless-stopped} |
||||
volumes: |
||||
- ${LOCAL_STACK_DIR}/db/data:/var/lib/mysql |
||||
env_file: |
||||
- nc_db.env |
||||
environment: |
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} |
||||
|
||||
networks: |
||||
default: |
||||
external: |
||||
name: ${NETWORK} |
@ -0,0 +1,4 @@ |
||||
# nextcloud and db |
||||
MYSQL_DATABASE=nextcloud |
||||
MYSQL_USER=nextcloud |
||||
MYSQL_PASSWORD= |
@ -0,0 +1,11 @@ |
||||
# nextcloud |
||||
NEXTCLOUD_ADMIN_USER= |
||||
NEXTCLOUD_ADMIN_PASSWORD= |
||||
NEXTCLOUD_DATA_DIR=/var/www/html/data |
||||
NEXTCLOUD_TABLE_PREFIX= |
||||
|
||||
# Reverse-proxy and certbot |
||||
VIRTUAL_HOST=subdomain.domain.tld |
||||
VIRTUAL_PORT=80 |
||||
LETSENCRYPT_HOST=subdomain.domain.tld |
||||
LETSENCRYPT_EMAIL=username@domain.tld |
Loading…
Reference in new issue