See the links at the bottom of this page for independant system install directions.
The docker image is intended to be a complete standalone instance of the core application. There is no need to install Nginx, Apache or a DB on the host system. For instance this docker image will easily run on amazon/ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20220912
.
$ sudo apt update
$ sudo apt install ca-certificates curl gnupg lsb-release
$ sudo mkdir -p /etc/apt/keyrings
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
$ echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
$ sudo apt update
$ sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
This command downloads a test image and runs it in a container. When the container runs, it prints a message and exits.
$ sudo service docker start
$ sudo docker run hello-world
Ideally, you should be using a brebones server. However, if it has a running instance of Nginx or Apapche, these should be disabled or removed.
If you do not have "paid-for" certificates, you can generate certificates that are not self-signed for free using certbot
, provided by the LetsEncrypt foundation.
Install Certbot:
$ sudo snap install core; sudo snap refresh core
$ sudo snap install --classic certbot
$ sudo ln -s /snap/bin/certbot /usr/bin/certbot
Generate the certificate. Replace my.domain.com
with your API domain name.
$ sudo certbot certonly --standalone --preferred-challenges http -d my.domain.com
List the certificates and their locations, and make a note of their locations for use when starting the image.
$ sudo certbot certificates
$ sudo mkdir -p /data/apiopenstudio_admin
$ sudo curl https://raw.githubusercontent.com/naala89/apiopenstudio_admin/master/example.settings.yml --output /data/apiopenstudio_admin/settings.yml
Update:
admin.url
- The admin URLadmin.api_url
- The API URLadmin.base_path
- /var/www/html/
Replace the paths for the certificate key and certificate, and apiopenstudio image tag
that you want to install. Note: It is not advide to use the latest
tag, because this tag may be associated with the latest, potentially unstable develop
or master
branches - Select tags that that are release tags from the official site - i.e. 1.0.0-beta2
. To find the latest image, visit https://hub.docker.com/repository/docker/naala89/apiopenstudio_admin/general
$ sudo docker run -d --name apiopenstudio-admin \
-p 80:80 \
-p 443:443 \
--mount type=bind,source=/data/apiopenstudio_admin/settings.yml,target=/var/www/html/settings.yml \
--mount type=bind,source=/path/to/ssl.crt,target=/etc/nginx/certs/apiopenstudio_admin.crt \
--mount type=bind,source=/path/to/ssl.key,target=/etc/nginx/certs/apiopenstudio_admin.key \
naala89/apiopenstudio_admin:<tag>
With everything now running, we need to SSH into the api container and run the installation script to set up the database.
$ sudo docker exec -it apiopenstudio-admin bash
$ ./install.sh
ApiOpenStudio Admin is now successfully installed and ready to use!
Visit your Admin domain and log in.