There are instructions for setting up a tech demo at [0], but these instructions result in a complaint about not having jwt_something
not set up. A redditor pointed me towards [1], which seems to be a more complete document.
Demo Setup
Grab the ocis image.
docker pull owncloud/ocis
Create some necesary folders. We'll use the first to store the server config information. We'll use the second to persist the data the server produces. This means we can kill a container and create a new one and have all our configuration and data.
mkdir -p ocis/ocis-config && ocis/ocis-data
Initialize the configuration.
docker run --rm -ti -v ocis-config:/etc/ocis owncloud/ocis init
If you're like me, you've bumbled through this a few times already and now you're getting an error like:
Do you want to configure Infinite Scale with certificate checking disabled?
This is not recommended for public instances! [yes | no = default] yes
2023/08/30 04:23:22 Could not create config: config in /etc/ocis/ocis.yaml already exists
Fortunately we can overwrite that config file, wherever it came fromi [2]. Seriously, I nuked all my images, all my containers, and still I cannot get a state where there was no config file.
docker run --rm -ti -v $PWD/ocis-config:/etc/ocis owncloud/ocis init -f
NOTE: You must use absolute filepaths for the above BIND
mount in order for this to work.
Now that we have a configuration we can build a container to actually run.
The dockerfile
# Use the official OwnCloud/OCIS base image
FROM owncloud/ocis
# Set environment variables
ENV OCIS_INSECURE=true
ENV PROXY_HTTP_ADDR=0.0.0.0:9200
ENV OCIS_URL=https://192.168.0.47:9200
# Create necessary directories
RUN mkdir -p /etc/ocis /var/lib/ocis
# Expose port 9200
EXPOSE 9200
And we build using
docker built -t ocis-insecure .
Mounts are absent from the above file. This just initializes our working image. We'll use docker-compose.yml
to specify our mounts.
The docker-compose.yml
version: '3.1'
services:
ocis-insecure:
image: ocis-insecure
build: .
environment:
- IDM_CREATE_DEMO_USERS=true
volumes:
- './ocis-config:/etc/ocis'
- './ocis-data:/var/lib/ocis'
ports:
- '9200:9200'
Note we have to re-assert what ports we are forwarding.
Now we can launch the app and see if it works.
Check it out.
Find the host's address and go to https://<host IP address>:9200
in a browser. You should be greeted with a login page.
Right now my browsers complain about invalid certificates, so let's fix that. Later. When we roll a deployment of this app, it'll be behind a reverse proxy (maybe Nginx Proxy Manager [3] or linuxserver/swag [4]).
Links
- [0] https://owncloud.com/news/howto-install-owncloud-infinite-scale-tech-preview/
- [1] https://doc.owncloud.com/ocis/next/deployment/container/container-setup.html
- [2] https://doc.owncloud.com/ocis/next/deployment/general/ocis-init.html
- [3] https://nginxproxymanager.com/
- [4] https://github.com/linuxserver/docker-swag