You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 years ago | |
---|---|---|
backend | 3 years ago | |
frontend | 4 years ago | |
.gitignore | 4 years ago | |
Dockerfile-backend | 4 years ago | |
Dockerfile-frontend | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
docker-compose.yml | 2 years ago | |
nginx.conf | 4 years ago |
README.md
perktree
Interactive DnD perktree written with django, vue and d3
How to run
Docker
The easiest way to run it is using docker-compose.
- Create a
.env
file with the following entries
SECRET_KEY=[long random string]
DJANGO_ADMIN_USER=[username]
DJANGO_ADMIN_MAIL=[email]
DJANGO_ADMIN_PASS=[password]
DB_PASSWORD=[database-password]
- Build the images with
docker-compose build
- Run it with
docker-compose up -d
- Set up a reverse proxy pointing to the port set in docker-compose.yml (8019 by default), or change the port to 80 (There is no ssl support inside the container as of now)
Normal
- Build the frontend
cd frontend
yarn/npm install
yarn/npm build
- Install backend requirements from the pipfile using your python package manager of choice (though you should really use pipenv)
- Set up a database (postgresql is recommended, though myql should work)
- Edit thes entrypoint.sh script in the backend directory to add all the necessary env variables (you can find them in the docker-compose.yml file)
- Run the backend using the entrypoint.sh script
- Set up a web server to serve the frontend static files and proxy requests to the backend. A sample configuration can be found in nginx.conf
Though I do recommend running it with docker, as it's much easier to set up and maintain.