Safepath-AS / greentechsee-2024

Greentechsee Hackathon 2024
https://greentechsee.safepath.no/
0 stars 0 forks source link

Shellsea AI Copilot

https://greentechsee.safepath.no/ (ca. 8 USD gjenstår med bruk av AI chat)

Medlemmer

OKR-er (objectives and key results)

Running the app using docker

GitHub Actions are used to build and push the docker images to the GitHub Container Registry on every push to the main branch. These images are public and you can use the docker-compose.yml to run the app locally. This will run a local nginx-proxy which exposes port 80 and 443 to the internet, and acme-companion which will automatically generate SSL certificates using Let's Encrypt.

Running as the single application on a server

To run the app using docker, make sure you have docker installed on your machine.

Copy the .env.template file to .env and fill in the required environment variables.

$ cp .env.template .env

Then run the following command to start the app:

$ docker-compose up

Running multiple applications on the same server

We have separated the nginx-proxy into a single compose file in case you might want to run multiple applications on the same server. Use the two compose configs separately for this.

Example:

docker-compose -f nginx.docker-compose.yml up -d
docker-compose -f external.docker-compose.yml up -d

You can then setup your other applications using similar setups as the external.docker-compose.yml file.

Development

Guides to run the app locally.

App

Powered by React

Requirements

Dowload and install node LTS from nodejs.org

[!NOTE] Make sure to change directory to the app folder by running cd app.

To install requiremnts run:

$ npm install

Run locally

$ npm run dev

Api

Built with FastAPI

Requirements

Dowload and install python from python.org

[!NOTE]
Make sure to change directory to the api folder by running cd api.

To install requiremnts run:

$ pip install -r requirements.txt

Run locally

To run the server locally run:

$ uvicorn app.main:app --reload

Database

Run the database using docker-compose:

$ docker-compose -f docker-compose.yml run --service-ports -d database