initial commit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
app/
|
||||
certs/
|
||||
data/
|
||||
db/
|
||||
.env
|
||||
@@ -0,0 +1,12 @@
|
||||
FROM nextcloud:latest
|
||||
|
||||
# Install smbclient and required dependencies
|
||||
RUN set -x && apt-get update \
|
||||
# PHP Module smbclient
|
||||
&& apt-get install -y smbclient libsmbclient-dev \
|
||||
&& pecl install smbclient \
|
||||
&& docker-php-ext-enable smbclient \
|
||||
# ffmpeg
|
||||
&& apt-get install -y ffmpeg \
|
||||
&& apt-get clean \
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
services:
|
||||
nextcloud:
|
||||
# image: nextcloud:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: nextcloud
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
- imaginary
|
||||
volumes:
|
||||
- ./app:/var/www/html
|
||||
- ./data:/var/www/html/data
|
||||
environment:
|
||||
- POSTGRES_DB=nextcloud
|
||||
- POSTGRES_USER=nextcloud
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_HOST=postgres
|
||||
- NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.timothykim.net
|
||||
- REDIS_HOST=redis
|
||||
- SMTP_HOST=smtp.fastmail.com
|
||||
- SMTP_SECURE=ssl
|
||||
- SMTP_PORT=465
|
||||
- SMTP_AUTHTYPE=LOGIN
|
||||
- SMTP_NAME=timothykim@fastmail.fm
|
||||
- SMTP_PASSWORD=${SMTP_PASSWORD}
|
||||
- MAIL_FROM_ADDRESS=nextcloud.timothykim.net
|
||||
- MAIL_DOMAIN=fastmail.com
|
||||
- PHP_MEMORY_LIMIT=8G
|
||||
- PHP_UPLOAD_LIMIT=20G
|
||||
- APACHE_BODY_LIMIT=0
|
||||
networks:
|
||||
- nextcloud_net
|
||||
- internal_net
|
||||
- shared
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/status.php"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 120s
|
||||
|
||||
appapi-harp:
|
||||
image: ghcr.io/nextcloud/nextcloud-appapi-harp:release
|
||||
container_name: appapi-harp
|
||||
hostname: appapi-harp
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
nextcloud:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- HP_SHARED_KEY=${HP_SHARED_KEY}
|
||||
- NC_INSTANCE_URL=https://nextcloud.timothykim.net
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./certs:/certs
|
||||
networks:
|
||||
- nextcloud_net
|
||||
|
||||
postgres:
|
||||
image: postgres:17-alpine
|
||||
container_name: nextcloud-db
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./db:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_USER=nextcloud
|
||||
- POSTGRES_DB=nextcloud
|
||||
networks:
|
||||
- internal_net
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
container_name: nextcloud-redis
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- internal_net
|
||||
|
||||
|
||||
imaginary:
|
||||
image: nextcloud/aio-imaginary:latest
|
||||
container_name: nextcloud-imaginary
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- PORT=9000
|
||||
networks:
|
||||
- internal_net
|
||||
|
||||
networks:
|
||||
internal_net:
|
||||
nextcloud_net:
|
||||
external: true
|
||||
shared:
|
||||
external: true
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "Pulling latest Nextcloud image..."
|
||||
docker pull nextcloud:latest
|
||||
|
||||
echo "Stopping containers..."
|
||||
docker compose down
|
||||
|
||||
echo "Rebuilding Nextcloud container..."
|
||||
docker compose build --no-cache nextcloud
|
||||
|
||||
echo "Starting containers..."
|
||||
docker compose up -d
|
||||
|
||||
echo "Waiting for Nextcloud to be ready..."
|
||||
sleep 10
|
||||
|
||||
echo "Running Nextcloud upgrade..."
|
||||
docker compose exec -u www-data nextcloud php occ upgrade
|
||||
|
||||
echo "Checking status..."
|
||||
docker compose exec -u www-data nextcloud php occ status
|
||||
|
||||
echo "Running checks..."
|
||||
docker compose exec -u www-data nextcloud php occ check
|
||||
|
||||
echo "Adding missing database indices..."
|
||||
docker compose exec -u www-data nextcloud php occ db:add-missing-indices
|
||||
|
||||
echo "Nextcloud update complete!"
|
||||
Reference in New Issue
Block a user