Skip to content

andreiboyanov/blue-moon-cooking

Repository files navigation

Blue moon cooking


build status test results

This repository contains an application for cooking recipes management. The only interface provided is a REST API. It can be explored through the OpenAPI UI (see below).

Note
----
No authentication nor authorization mechanisms in this version version!

Project organisation

Global view of the system

comoponent diagram

Build

The app is running within Docker containers. To build the containers do the following:

  • copy the provided .env-sample file renaming it to .env
  • adjust the variables in the .env file to suite the desired configuration; pay attention to change the usernames and passwords
  • run docker-compose build

Running

Start with the following command:

docker-compose up -d

Creating a database

In this version of the product you have to create the application database. To do so, execute the following commands in the root directoryof the project:

 source .env && export $(cut -d= -f1 < .env)
 docker-compose exec bmcook cat bmcook/db/tools/init_db.sql | psql -U $POSTGRES_USER -h $POSTGRES_HOST -p $POSTGRES_PORT $POSTGRES_DATABASE
 docker-compose exec bmcook cat bmcook/tests/data/demo_data.sql | psql -U $POSTGRES_USER -h $POSTGRES_HOST -p $POSTGRES_PORT $POSTGRES_DATABASE

This will also install some demo data.

To test the installation, open /docs on the server where you`ve installed the application in your browser. Keep in mind adding the selected port. You must see the OpenAPI UI. For instance, if you installed it locally on the default port 8000, open the folowing url:

http://localhost:8000/docs

Deployment

Deploy the application as any other Docker based application. If you are deploying with the provided docker-compose.yml file, then you must include a configuration step where you generate the .env file (see above). Otherwhise you need to configure this variables depending on the deployment method you are using.

User guide

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published