Setup - WHG-Students/Bankingsystem GitHub Wiki
Prerequisites
- Install NodeJS version 12 or higher.
- Install npm version 6 or higher (should come with the nodejs download)
- Install yarn by entering
npm i -g yarn
- Install lerna by entering
npm i -g lerna
- Install the Docker Engine and then Docker Compose
- Create a .env file in every folder where a .env.example is given, fill out all ENV variables
Running the project
Development Setup
- Run
yarn
(Required after dependencies change) - Run
yarn serve
Production Setup
- Pull the Source Code from the master branch
- Run
docker-compose -f docker-compose.prod.yml up -d
- Setup a reverse proxy to access the servers.
To update your version, you can run
- Stop containers with
docker-compose -f docker-compose.prod.yml stop
- Run
docker-compose -f docker-compose.prod.yml build
- Rerun
docker-compose -f docker-compose.prod.yml up -d
Reverse Proxy
Nginx Example
server {
server_name domain.tld;
location / {
proxy_pass http://0.0.0.0:3502/;
}
location /api {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://0.0.0.0:3501/;
}
...
}