Shihaam Abdul Rahman b79281d857
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 18s
add ci
2025-02-14 05:49:14 +05:00
2025-02-14 05:44:20 +05:00
2025-02-14 05:49:14 +05:00
2022-11-04 14:06:35 +05:00
2022-11-04 23:47:43 +05:00
2024-06-29 18:36:13 +05:00

NextCloud Docker

I dont like official nextcloud docker

  • compose.yml
services:
  fpm:
    image: git.shihaam.dev/dockerfiles/nextcloud/fpm:latest
    hostname: fpm
    volumes:
      - ./nextcloud/config:/var/www/html/config:rw
      - ./nextcloud/apps:/var/www/html/apps:rw
      - /mnt/vol0/nextcloud-data:/var/www/html/data:rw
    depends_on:
      - mysql

  nginx:
    image: git.shihaam.dev/dockerfiles/nextcloud/nginx
    hostname: nginx
    ports:
      - 8003:80
    volumes_from:
      - fpm
    depends_on:
      - fpm

  mysql:
    image: mysql:8.0-debian
    hostname: mysql
    environment:
      MYSQL_DATABASE: nextcloud
      MYSQL_USER: nextcloud
      MYSQL_PASSWORD: nextcloud
      MYSQL_ALLOW_EMPTY_PASSWORD: true
    volumes:
      - ./nextcloud/database:/var/lib/mysql
  • You must use a reverse proxy with SSL before starting to setup, personally i use nginx with certbot.
    here is my nginx config
server {
  server_name nextcloud.shihaam.me; #Change this to your domain
        listen 80;
  location / {
    proxy_pass http://localhost:8000;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
  }
}
  • SSL with certbot
sudo certbot --nginx -d nextcloud.shihaam.me
  • Configure your DNS accordingly and then.. thats it, enjoy.
Description
i hate the official and other nextcloud containers i found, decided to make my own.
Readme 365 KiB
Languages
Shell 55.8%
Dockerfile 44.2%