https://github.com/hasufell/docker-gentoo-pydio
Guide to set up docker based pydio with gentoo containers
https://github.com/hasufell/docker-gentoo-pydio
Last synced: about 2 months ago
JSON representation
Guide to set up docker based pydio with gentoo containers
- Host: GitHub
- URL: https://github.com/hasufell/docker-gentoo-pydio
- Owner: hasufell
- Created: 2015-08-27T23:15:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-16T15:04:56.000Z (over 8 years ago)
- Last Synced: 2025-01-28T18:46:01.268Z (4 months ago)
- Language: Shell
- Homepage:
- Size: 280 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gentoo based pydio with atomic nginx, mysql, php and data containers

## Getting started
__All of the commands should be executed from within the basedir
of this clone!__### Prerequisites
SSL certificates:
* make sure you have a proper ssl certificate setup in `./nginx-proxy/ssl/server`, one for each virtual host you are running (if the virtual hostname is `foo.bar.com`, then the cert must be named `foo.bar.com.crt` and the key `foo.bar.com.key`), this folder will be mapped into the proxy serverNow we just need a few more steps:
* install [docker-compose](https://docs.docker.com/compose/install/)
* create the data containers: `docker-compose -f docker-compose-data.yml up && docker-compose -f docker-compose-data-static.yml up`
* start the reverse proxy: `docker-compose -f docker-compose-reverse-proxy.yml up -d`### Initializing for the first time
```sh
STARTUP_SQL=/mysql-scripts/create_pydio_db.sql \
VIRTUAL_HOST= \
PYDIO_DB_PW= \
MYSQL_PASS= \
docker-compose up -d
```## Restarting
### Restarting the backend servers
```sh
docker-compose stop
docker-compose rm
VIRTUAL_HOST= docker-compose up -d
```### Restarting the front proxy
```sh
docker-compose -f docker-compose-reverse-proxy.yml stop
docker-compose -f docker-compose-reverse-proxy.yml rm
docker-compose -f docker-compose-reverse-proxy.yml up -d
```## Backups
### Creating backups
We can simply create backups of all our data containers:
```sh
bin/create-backup.sh
```
This will drop 2 files into the current working dir, e.g.:
```
pydio-data-backup-2015-09-02-11:53.tar.xz
mysql-data-backup-2015-09-02-11:53.tar.xz
```### Restore from backup
Suppose we have the backups in `pydio-data-backup-2015-09-02-11:53.tar.xz` and
`mysql-data-backup-2015-09-02-11:53.tar.xz` in the current directory and want
to add that data on a new host. First we follow the
[Prerequisites](README.md#prerequisites) section as usual. But we do
__not__ follow the
[regular initialization](README.md#initializing-for-the-first-time).
Instead, we run the following command:
```sh
bin/restore-backup.sh \
pydio-data-backup-2015-09-02-11:02.tar.xz \
mysql-data-backup-2015-09-02-11:02.tar.xz
```And now we _initialize_ the containers:
```sh
VIRTUAL_HOST= docker-compose up -d
```## Updates
### Non-pydio updates
Pull the latest images:
```sh
docker-compose pull
docker-compose -f docker-compose-reverse-proxy.yml pull
```Rebuild local images:
```sh
docker-compose build --no-cache
```Restart containers:
```sh
docker-compose -f docker-compose-reverse-proxy.yml stop
docker-compose -f docker-compose-reverse-proxy.yml rm
docker-compose -f docker-compose-reverse-proxy.yml up -d
docker-compose stop
docker-compose rm
VIRTUAL_HOST= docker-compose up -d
```## Setting up pydio
Now use a browser and access the site, e.g. `https://www.example.net` if
that is your nginx hostname. You will go through the setup wizard.When the pydio setup wizard requires you to enter the mysql server hostname,
just type in `mysql`. The pydio user and database are both `pydio` and the
pydio password is what you supplied in the environment variable `PYDIO_DB_PW`
when you set up the containers.For public links to work, log in as admin and go to the the admin settings
(top right corner, then settings). Double click on _Application Parameters_,
then on _Pydio Main Options_. Under _Main Options_ insert `https://`
into the _SERVER URL_ field.On the same page you should also activate the PHP command line (further down
under the _Command Line_ section, activate the 'yes' checkbox at
_COMMAND-LINE ACTIVE_).## TODO
* don't expose the docker socket on the machine which is exposed to the net
* allow to create multiple pydio instances on one host
* outline the whole update procedure