https://greentechsee.safepath.no/ (ca. 8 USD gjenstår med bruk av AI chat)
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.
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
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.
Guides to run the app locally.
Powered by React
Dowload and install node LTS from nodejs.org
[!NOTE] Make sure to change directory to the
app
folder by runningcd app
.
To install requiremnts run:
$ npm install
$ npm run dev
Built with FastAPI
Dowload and install python from python.org
[!NOTE]
Make sure to change directory to theapi
folder by runningcd api
.
To install requiremnts run:
$ pip install -r requirements.txt
To run the server locally run:
$ uvicorn app.main:app --reload
Run the database using docker-compose:
$ docker-compose -f docker-compose.yml run --service-ports -d database