mirror of
https://github.com/Thumbscrew/nextcloud-docker-compose.git
synced 2025-01-18 17:45:46 +00:00
add intial docker-compose with mariadb, redis and nextcloud
This commit is contained in:
parent
0483eeaf1c
commit
cb94c84ea0
15
.env.example
Normal file
15
.env.example
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# volume
|
||||||
|
VOLUME_PATH=/data/nextcloud
|
||||||
|
|
||||||
|
# nextcloud
|
||||||
|
NEXTCLOUD_TAG=23-apache
|
||||||
|
|
||||||
|
# mariadb
|
||||||
|
MARIADB_TAG=10
|
||||||
|
|
||||||
|
# nginx
|
||||||
|
NGINX_HOST=localhost # REPLACE
|
||||||
|
NGINX_HTTP_PORT=80
|
||||||
|
NGINX_HTTPS_PORT=443
|
||||||
|
SSL_CERT_PATH=/etc/ssl/certs/ssl-cert-snakeoil.pem # REPLACE
|
||||||
|
SSL_KEY_PATH=/etc/ssl/private/ssl-cert-snakeoil.key # REPLACE
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.env
|
||||||
|
mariadb_password.txt
|
44
docker-compose.yaml
Normal file
44
docker-compose.yaml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
secrets:
|
||||||
|
mariadb_password:
|
||||||
|
file: ./mariadb_password.txt
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: mariadb:${MARIADB_TAG}
|
||||||
|
restart: unless-stopped
|
||||||
|
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
|
||||||
|
secrets:
|
||||||
|
- mariadb_password
|
||||||
|
volumes:
|
||||||
|
- ${VOLUME_PATH}/var/lib/mysql:/var/lib/mysql
|
||||||
|
environment:
|
||||||
|
MARIADB_RANDOM_ROOT_PASSWORD: "yes"
|
||||||
|
MARIADB_PASSWORD_FILE: /run/secrets/mariadb_password
|
||||||
|
MARIADB_DATABASE: nextcloud
|
||||||
|
MARIADB_USER: nextcloud
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
nextcloud:
|
||||||
|
build:
|
||||||
|
context: nextcloud
|
||||||
|
args:
|
||||||
|
NEXTCLOUD_TAG: ${NEXTCLOUD_TAG}
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ${VOLUME_PATH}/var/www/html:/var/www/html
|
||||||
|
secrets:
|
||||||
|
- mariadb_password
|
||||||
|
environment:
|
||||||
|
MYSQL_PASSWORD_FILE: /run/secrets/mariadb_password
|
||||||
|
MYSQL_DATABASE: nextcloud
|
||||||
|
MYSQL_USER: nextcloud
|
||||||
|
MYSQL_HOST: db
|
||||||
|
REDIS_HOST: redis
|
||||||
|
NEXTCLOUD_TRUSTED_DOMAINS: ${NGINX_HOST}
|
||||||
|
OVERWRITEPROTOCOL: https
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
- redis
|
5
nextcloud/Dockerfile
Normal file
5
nextcloud/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
ARG NEXTCLOUD_TAG
|
||||||
|
FROM nextcloud:${NEXTCLOUD_TAG}
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get install ffmpeg -y --no-install-recommends
|
Loading…
Reference in New Issue
Block a user