Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Add docker-compose.yml example #101

Open
450780 opened this issue Sep 25, 2022 · 1 comment
Open

Add docker-compose.yml example #101

450780 opened this issue Sep 25, 2022 · 1 comment

Comments

@450780
Copy link

450780 commented Sep 25, 2022

It could be nice to add a docker-compose.yml example like this repo to the project
https://github.com/crazy-max/docker-nextcloud/tree/master/examples/compose

@ghost
Copy link

ghost commented Dec 24, 2022

Note: the build clause doesn't need to exist if you just want to pull the pre-compiled image. You'd replace it with image: ghcr.io/wonderfall/nextcloud

version: '3.9'
services:
  nextcloud:
    build:
      context: .
      # these are available on build
      args:
        - NEXTCLOUD_VERSION=25.0.2
        - ALPINE_VERSION=3.16
        - PHP_VERSION=8.1
        - NGINX_VERSION=1.22
        - HARDENED_MALLOC_VERSION=11
        - SNUFFLEUPAGUS_VERSION=0.8.3
        - SHA256_SUM=d6ab40faa108937bda42395f570ff111f4c97343b55be1420024da3177e37d59
        - GPG_FINGERPRINT="2880 6A87 8AE4 23A2 8372  792E D758 99B9 A724 937A" # Nextcloud Security <[email protected]> (D75899B9A724937A)
        - UID=1000
        - GID=1000
        - CONFIG_NATIVE=false
        - VARIANT=light
    container_name: nextcloud
    restart: unless-stopped
    environment:
      # Runtime Variables
      - UPLOAD_MAX_SIZE=10G
      - APC_SHM_SIZE=128M
      - OPCACHE_MEM_SIZE=128M
      - MEMORY_LIMIT=512M
      - CRON_PERIOD=5m
      - CRON_MEMORY_LIMIT=1G
      - DOMAIN=localhost
      - PHP_HARDENING=true
      # Startup Variables 
      - ADMIN_USER=user
      - ADMIN_PASSWORD=password
      - DB_TYPE=mysql
      - DB_NAME=ncdb
      - DB_USER=user
      - DB_PASSWORD=password
      - DB_HOST=nextcloud-db
    ports:
      - 8888:8888
    volumes:
      - ./data:/data
      - ./config:/nextcloud/config
      - ./apps2:/nextcloud/apps2
      - ./themes:/nextcloud/themes
    depends_on:
      - nextcloud-db

  nextcloud-db:
    image: mysql:8
    container_name: nextcloud-db
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=rootpassword
      - MYSQL_USER=user
      - MYSQL_PASSWORD=password
      - MYSQL_DATABASE=ncdb
    ports:
      - 3306:3306
    volumes:
      - ./mysql:/var/lib/mysql

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant