The image expects that volumes are used. The reason is quite clear: existing data in the target folder gets coppied into the volume, while a mount bind completly replaces the original folder. Since the UI only allows mount bind, volumes need to be used and the stack needs to be started from the ssh shell!
The original example did not care about the persistance of the mysql database data. I added the configuration parts to the config.
docker-compose.yml:
YAML:
version: '2.2'
services:
resourcespace-app:
image: creecros/resourcespace-docker:latest
restart: unless-stopped
container_name: resourcespace
ports:
# change host port 8888 to whatever you need
# host:container/protocol
- 8888:80/tcp
volumes:
- include:/include
- filestore:/filestore
resourcespace-mysql:
image: mysql:5.6
restart: unless-stopped
container_name: resourcespace-mysql
environment:
MYSQL_DATABASE: resourcespace
MYSQL_ROOT_PASSWORD: Un1c0rn
volumes:
- database:/var/lib/mysql
volumes:
filestore:
driver: local
driver_opts:
type: none
# change path in device to an existing path on your diskstation!
device: /volume1/docker/resourcespace/filestore
o: bind
include:
driver: local
driver_opts:
type: none
# change path in device to an existing path on your diskstation!
device: /volume1/docker/resourcespace/include
o: bind
database:
driver: local
driver_opts:
type: none
# change path in device to an existing path on your diskstation!
device: /volume1/docker/resourcespace/database
o: bind
Make sure to store the content of aboves block in a file called
docker-compose.yml
on your ds (e.g. in /volume1/docker/resourcespace) . Make sure that the folders used in device exist before a
docker-compose up -d
is called, otherwise the command will raise an error.
In case you don't want to use port 8888 on your DS, replace the port to a free port of your choosing. If you want to store the data in a different location, make sure to change the values of the device lines.
Good luck!