Skip to content

Projekt-DataScience/infrastructure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infrastructure

Deployment Code to deploy the web application. After running docker-compose-backend.yml, the containers will be deployed in the following schema:

Deployment

Deploying only backend

You need to be logged in via Docker CLI to Github. Tutorial

  1. Clone the repository
git clone https://github.com/Projekt-DataScience/infrastructure.git

After that you should have docker-compose-backend.yml and example.env locally on your machine.

image

  1. Copy the example.env file to .env
cp example.env .env

Now you should have a .env file

image

  1. OPTIONAL: Change environment variables. You can do that by changing the values in .env. But do not change the DB_HOSTNAME environment variable!

image

  1. Start the backend with the following command:
docker-compose -f docker-compose-backend.yml up

Or you can also use make:

make start-backend

Currently this command will start the following:

  • Database Server on port 5432 (if you have not changed the DB_PORT environment variable)
  • PgAdmin on port 8080
  • Audit Service on port 8081

Updating images

Updating everything (including database structure)

All the data inside the database will be lost

The following commands should be run, if the database structure changed. That happens when new models/tables are added to backend-db-lib or existing models/tables are changed.

docker-compose -f docker-compose-backend.yml rm
docker volume rm infrastructure_manager_volume
docker-compose -f docker-compose-backend.yml pull
docker-compose -f docker-compose-backend.yml up

OR:

make reset-db

Updating only images, without updating database structure

This won't delete any data in the database. Stop already running containers of this infrastructure and run the following commands:

docker-compose -f docker-compose-backend.yml pull
docker-compose -f docker-compose-backend.yml up

OR:

make update

Updating changes to the environment variable

git pull
cp example.env .env
docker-compose -f docker-compose-backend.yml up

About

Deployment Code to provision infrastructure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published