Skip to content

simonallfrey/openstudioproject-docker

 
 

Repository files navigation

How to run OpenStudio yoga software in the Docker.

WARNING: in my env works unstable, web2py just dies time to time.

  1. Install Docker.
  2. Install Docker Compose.
  3. Create directory structure (you can adjust):
  4. 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
  1. When MySQL successfully started and created database/user, stop container by pressing "ctrl+\".
  2. Download web2py. 2.17.7 at the time of writing.
  3. Unpack it into /root/docker/openstudioproject-docker/data/. The directory will be web2py-R-2.17.1.
  4. Download OpenStudio. 2018.81.0 at the time of writing.
  5. Unpack into /root/docker/openstudioproject-docker/data/web2py-R-2.17.1/applications. You can rename folder to "yogastudio" for simplicity.
  6. Update yogastudio/private/appconfig.ini:
[db]
uri = mysql://yoga:pwd1@ym/openstudio_db
...
[cache]
cache = redis
redis_host = yr
  1. Create/adjust routes.py according to recommendations OpenStudio install
  2. 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.

  1. 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.

  1. Build image:
./cr_image.sh
  1. Start applications (port 8000 for nossl or 8443 for ssl):
./start.sh
  1. Open browser on http://host:8000 or https://host:8443. Default user/password is [email protected]/OSAdmin1# (taken from OpenStudio docs)
  2. Stop, if needed:
./stop.sh

About

OpenStudio Project on Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%