如何搭建个人网盘

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容