如何搭建个人网盘

How to build your own yunpan

build a docker server

https://docs.docker.com/engine/installation/linux/ubuntu/

install Docker Compose

sudo apt install docker-compose

create a docker-compose.yml

postgres-data:
  image: postgres
  command: /bin/true
  volumes:
    - ~/owncloud/etc/postgresql:/etc/postgresql
    - ~/owncloud/var/lib/postgresql:/var/lib/postgresql
owncloud-data:
  image: owncloud
  # This is a data container, so we want to exit as soon as the container is created
  # BUT we will have to fix permissions issues first (33 is the ID of the www-data user)
  command: /bin/bash -c "/bin/chown -R 33 /var/www/html/data && /bin/chown -R 33 /var/www/html/config"
  volumes:
    - ~/owncloud/var/www/html/apps:/var/www/html/apps
    - ~/owncloud/var/www/html/data:/var/www/html/data
    - ~/owncloud/var/www/html/config:/var/www/html/config
owncloud:
  image: owncloud
  ports:
    - 80:80
  volumes_from:
    - owncloud-data
  links:
    - postgres:postgres
  hostname: cloud
  domainname: cloud.example.org # Change to the hostname you will use
postgres:
  image: postgres
  environment:
    - POSTGRES_USER=YourUserName
    - POSTGRES_PASSWORD=YourPassWord
  volumes_from:
    - postgres-data

docker-compose up

你可能感兴趣的:(如何搭建个人网盘)