This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Getting Started
Tim Buchholz edited this page Feb 21, 2021
·
14 revisions
- Clone the repo
git clone https://github.com/BuchholzTim/Whitebird.git
. - Navigate to the
docker
folder in the project. There are two folderswhitebird_dev
andwhitebird_prod
. For production we only need thewhitebird_prod
. - In the
whitebird_prod
folder you can find adocker-compose.yml
and a config filebackend.env
. - Configure all files to your needs or just use the default settings.
- To start the application just use
docker-compose up -d
to run the application. - After successful building go to http://localhost:40000 (with default settings) and start collaborating!
services:
mongodb:
container_name: WhitebirdDatabase # Name of the database container
restart: 'no'
image: mongo:latest
environment:
MONGO_INITDB_ROOT_USERNAME: root # Root Username MongoDB
MONGO_INITDB_ROOT_PASSWORD: asdasd # Password of the MongoDB
volumes:
- mongodb_data:/data/db
backend:
container_name: WhitebirdBackend # Name of the backend container
restart: 'no'
build: ../../backend
env_file: ./backend.env
depends_on:
- mongodb
ports:
- '40001:3001' # Backend Port API
frontend:
container_name: WhitebirdFrontend
restart: 'no'
build: ../../frontend
ports:
- '40000:5000' # Frontend Port
volumes:
mongodb_data:
The Frontend (currently) has to be configured by changing the following three environment-variables in the Dockerfile
of the frontend.
Nuxt needs those Values at Build-Time and doesn't recognize them, when they are set via a frontend.env
in the docker-compose.yml
.
# Backend Server Location
API_URL='http://backend:3001/' # the ip and the port of api of our backend
SOCKET_URL='http://backend:3002/' # the ip and the port of the socket in our backend
# Frontend Host
FRONTEND_HOST='http://localhost:40000' # the ip and the port needed for for the link shown to share a whiteboard
# ---------------------- MONGODB ----------------------------
MONGO_URI=mongodb://root:asdasd@mongodb # the db connection string
MONGO_DBNAME=backend # the name of our mongodb
# -------------------- APP SETTINGS -------------------------
APP_BACKEND_PORT=3001 # the port of our backend
APP_SOCKET_PORT= # the port of our socket - If you want the Socket to run on the same Port (which is required by some providers like Heroku), just leave this empty>
APP_JOINCODE_LENGTH=8 # the length of the join-codes