franklindyer / agora-app

Simple and (hopefully) secure social media application. Also a project for spring 2024 CS 444 cybersecurity class at UNM.
4 stars 1 forks source link

Intended project structure:

╚═ agora-app
   ╠═ src
   ║  ╠═ Dockerfile
   ║  ╠═ server.py
   ║  ╠═ utilities
   ║  ╠═ templates
   ║  ╠═ params
   ║  ╠═ tests
   ║  ╠═ static
   ║  ║  ╠═ css
   ║  ║  ╠═ js
   ║  ║  ╚═ img
   ║  ╚═ volumes (GITIGNORE)
   ║     ╠═ db
   ║     ╠═ img
   ║     ╠═ logs
   ║     ╚═ posts
   ╠═ docs
   ╠═ README.md
   ╚═ TODO.md

Create a volumes folder inside of src to house your copy of the database:

mkdir src/volumes

To add a (empty) database, run the following from inside of volumes:

sqlite3 agora.db < ../params/agora.schema

You can run this with Docker Compose. First you need to define a few environment variables in a file called .env in the project root. (It should be gitignored, since it will have some sensitive info in it.) The following environment variables must be defined there:

Then, just run docker compose up!