Skip to content

Installation (Docker)

Aleksey Ilyin edited this page Sep 22, 2024 · 11 revisions
Table of Contents

Preparing the server
Environment variables
Installing the engine

Preparing the server

  1. Update your existing package list:
sudo apt update
  1. Install several required packages:
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
  1. Add the GPG key for the official Docker repository to your system:

Debian

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

Ubuntu

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  1. Add the Docker repository to your APT sources:

Debian

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

Ubuntu

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  1. Update the package database again:
sudo apt update
  1. Install Docker and Docker Compose:
sudo apt install docker-ce docker-ce-cli docker-compose

Environment variables

DEBUG - debug mode (boolean);
TZ - timezone offset (string);
SIMPLE_PHONE_CHECK - simplified phone check (boolean);
DATABASE - DSN connecting to the database (string);

Installing the platform

  1. Clone the template repository:
git clone https://github.com/getwebspace/platform-template.git mysite

Note: mysite should be changed to a convenient name.

  1. Set write permissions:
chmod -R 0777 plugin
chmod -R 0777 resource 
chmod -R 0777 theme 
chmod -R 0777 var
  1. Start the container manual:
docker run --detach \
--name mysite \
--publish 80:80 \
--restart always \
--volume $PWD/plugin:/var/container/plugin:ro \
--volume $PWD/resource:/var/container/public/resource:ro \
--volume $PWD/theme:/var/container/theme:ro \
--volume $PWD/var:/var/container/var:rw \
--volume $PWD/var/upload:/var/container/public/uploads:rw \
getwebspace/platform:latest

Or modify the docker-compose.yml file to suit your needs.

  1. Initialize the database and create a user with administrator rights:
  • Open the system page of the site in a browser (eg. https://example.com/cup/system);
  • Enter your user details and take action.

Clone this wiki locally