Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Contributing

## Formatting python code
## Formatting

### Python

This repository uses [autopep8](https://pypi.org/project/autopep8/) to format Python code with its default settings.

Expand All @@ -20,7 +22,7 @@ Check formatting by running:
pycodestyle --exclude back-end/server/settings.py,*/migrations/*.py .
```

## Formatting TF configuration
### TF

This repository uses `tofu fmt` to format `.tf` configuration files.

Expand All @@ -36,7 +38,7 @@ Check formatting by running:
tofu fmt -check -recursive
```

## Formatting other code
### Other code

This repository uses [Prettier](https://prettier.io/) to format code with its default settings.

Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ This is an example application for:
- Learning basics of how modern web applications are built with HTML, CSS, JavaScript, servers, and databases.
- Deploying something a little more advanced than a _Hello world!_ page or unconfigured nginx server.

## Running the application

To run the application on your machine, you will need [Docker Compose](https://docs.docker.com/compose/). You can either install it manually or by using Docker Desktop (see also [Installing Docker](https://cicd-tutorials.net/#installing-docker)).

To start the application, run `docker compose up -d`. This will build the container images and start the containers in the background. The application should be soon available in [http://localhost:8080](http://localhost:8080). The API container will create two demo forms, which are available in [/thumbs](http://localhost:8080/thumbs) and [/weather](http://localhost:8080/weather) paths.

```sh
docker compose up -d
```

If you want to inspect the admin panel, print out the content of `/var/feedback/initial_admin_password` in the `api` container with `docker compose exec` for the initial admin account password. Admin panel is available in [http://localhost:8080/admin](http://localhost:8080/admin) and the username for the admin account is `admin`.

```sh
docker compose exec api cat /var/feedback/initial_admin_password
```

For a more production like deployment, there is an OpenTofu/Terraform configuration example in [iac/tf](./iac/tf/) directory.

<!-- TODO: configuration -->

## Three-tier architecture

The application is built using a three-tier architecture. I.e., the application consists of presentation tier, application tier and a data tier.
Expand Down