How to run OpenStudio yoga software in the Docker.
- Install Docker.
- Install Docker Compose.
- Create directory structure (you can adjust):
- mkdir /root/docker
- cd /root/docker
- git clone https://github.com/skorzhevsky/openstudioproject-docker.git.
- Create MySQL database: run MySQL container in interactive mode (you can change passwords):
docker run -it --rm --name yoga-mysql -v /root/docker/openstudioproject-docker/data/mysql:/var/lib/mysql -e MYSQL_USER=yoga -e MYSQL_PASSWORD=pwd1 -e MYSQL_DATABASE=openstudio_db -e MYSQL_ROOT_PASSWORD=pwd2 mysql:5.7 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
- When MySQL successfully started and created database/user, stop container by pressing "ctrl+\".
- Download web2py. 2.17.7 at the time of writing.
- Unpack it into /root/docker/openstudioproject-docker/data/. The directory will be web2py-R-2.17.1.
- Download OpenStudio. 2018.81.0 at the time of writing.
- Unpack into /root/docker/openstudioproject-docker/data/web2py-R-2.17.1/applications. You can rename folder to "yogastudio" for simplicity.
- Update yogastudio/private/appconfig.ini:
[db]
uri = mysql://yoga:pwd1@ym/openstudio_db
...
[cache]
cache = redis
redis_host = yr
- Create/adjust routes.py according to recommendations OpenStudio install
- If you don't need SSL, run:
./copy-nossl.sh
to copy Dockerfile-nossl to Dockerfile and docker-compose.yml-nossl to docker-compose.yml.
- If you need SSL support, run
./copy-ssl.sh
to copy Dockerfile-ssl to Dockerfile and docker-compose.yml-ssl to docker-compose.yml, then create certificate (or self-signed) and update Dockerfile and docker-compose.yml accordingly.
- Build image:
./cr_image.sh
- Start applications (port 8000 for nossl or 8443 for ssl):
./start.sh
- Open browser on http://host:8000 or https://host:8443. Default user/password is [email protected]/OSAdmin1# (taken from OpenStudio docs)
- Stop, if needed:
./stop.sh