Forked from MickaelBergem/ owncloud-docker-compose.yml
Created
November 6, 2015 21:06
-
-
Save rothgar/0d715ee244456b754c82 to your computer and use it in GitHub Desktop.
Docker Compose file for setting up an ownCloud server using a PostgreSQL database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Composition of the containers | |
owncloud: | |
image: owncloud | |
ports: | |
- 80:80 | |
volumes_from: | |
- owncloud-data | |
links: | |
- postgres:owncloud-db | |
hostname: cloud | |
domainname: cloud.example.org # Change to the hostname you will use | |
postgres: | |
image: postgres | |
environment: | |
- POSTGRES_PASSWORD=mysecretpassword | |
volumes_from: | |
- postgres-data | |
postgres-data: | |
image: postgres | |
# This is a data container, so we want to exit as soon as the container is created | |
command: /bin/true | |
volumes: | |
- /etc/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: | |
- /var/www/html/data | |
- /var/www/html/config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment