Docker
Operational can be installed via docker-compose.
Step 1. Install Docker
For local installations, you can install Docker desktop from here.
On your server, you’ll install docker and docker-compose via the command line.
Step 2. Clone the repo
Now clone the repo at https://github.com/operational-co/operational.co
Step 3. Create .env files
- Once cloned, cd into the repo.
- Create a .env file in the folder
- Create a .env file in the /backend folder
- Add this in the .env for /backend: DATABASE_URL=""
Step 4. Run docker compose
In the repo folder, run docker-compose up
This will setup
- mysql 8.x
- /app directory which will serve static html via nginx
- /backend nodejs app
Hosting via docker
The above setup is great for getting started locally.
However for your main setup, you want to add this .env to /backend
DATABASE_URL=""
# Eg https://xyz.com
APP_URL=""
# Optional. Set vapid details for push notifications. Generate your vapid details from https://tools.reactpwa.com/vapid
VAPID_EMAIL=""
VAPID_PUBLIC_KEY=""
VAPID_PRIVATE_KEY=""
# Nodejs env, defaults to development. Set it to production when hosting online.
NODE_ENV="development"
# Port. Defaults to 2000
PORT="2000"
# Secret hash. DON'T LEAVE THIS EMPTY. Use a random id generator to generate a hash, eg: https://www.uuidgenerator.net/
SECRET=""
# ["http://localhost:8080"] Allows cors from this url. If APP_URL is set, that will be used instead.
# Set a cors url to override the current url
# /api/v1/ingest is allowed from all urls so it can receive events without any cors issue.
# Set this value to "*" to allow all urls
CORS=""
Copy