-
Notifications
You must be signed in to change notification settings - Fork 5
Backend System Manual
Muhammed Enes Toptaş edited this page Jan 31, 2021
·
1 revision
In this file, we'll walk you through on how you can get the backend and backend related services such as Postgresql Database and Elasticsearch running.
- Docker
- Docker-Compose
- Preferably a Linux distribution as the OS
The docker image of the backend application is stored in the file akademise.tar. Also since we will have 3 containters running in parallel, we will also need a docker-compose.yml. This YAML file can be found in the main directory of this repository. Database dump akademise.db is also required, if you want to restore the database.
- First change directory to the directory where you keep the file akademise.tar
- Run below command to import the image into your docker system
docker image load -i akademise.tar
- Now head in to the directory where you keep the file docker-compose.yml
- Open up this file and have a look at line 26
- This url should be the url that other people will use to connect to this computer. So change this url accordingly. If you are not planning to expose the backend to outerworld, you might simply write localhost. We use this url to create the links to the static files in the project, such as profile pictures. For example if you provide www.example.com, a profile picture will reside in the url www.example.com/static/avatars/filename.png.
- Under database-service tab, you can see the username, password and the database name the project uses. DO NOT change these variables, these are preconfigured in the akademise image, and changing these settings here will cause the backend app not being able to connect to the database.
- After saving the file after changes, again head in to the directory of the file docker-compose.yml
- Now run below command to run the docker-compose
docker-compose up -d
- After docker does it's thing, we are done. You can reach the rest API on port 3000, the database on port 5432 and the elasticsearch client on port 9200
The database is initially empty, to restore the database follow directions below:
- Run the below command to copy the dump into Postgresql container
docker cp akademise.db bounswe2020group6_database-service_1:/
- Then run the below command to enter the Postgresql container
docker exec -it bounswe2020group6_database-service_1 bash
- Make sure you are inside of the container
- Finally run below command inside the container to import the dump
psql akademise < akademise.db
- Current Members
- Former Members
- Project Description
- Project Requirements
- Customer Questions & Answers
- User Scenarios&Mockups
- Diagrams
- Meeting #1 (13.02.2020)
- Meeting #2 (20.02.2020)
- Meeting #3 (27.02.2020)
- Meeting #4 (05.03.2020)
- Meeting #5 (12.03.2020)
- Meeting #6 (05.04.2020)
- Meeting #7 (16.04.2020)
- Meeting #8 (23.04.2020)
- Meeting #9 (30.04.2020)
- Meeting #10 (07.05.2020)
- Meeting #11 (14.05.2020)
- Meeting #12 (21.05.2020)
- Meeting #13 (27.10.2020)
- Meeting #14 (03.11.2020)
- Meeting #15 (10.11.2020)
- Meeting #16 (17.11.2020)
- Meeting #17 (01.12.2020)
- Meeting #18 (08.12.2020)
- Meeting #19 (15.12.2020)
- Meeting #20 (22.12.2020)
- Meeting #21 (05.01.2021)
- Meeting #22 (12.01.2021)
- Meeting #23 (19.01.2021)
- CmpE 352
- CmpE 451