granda (Polish for fracas) is a web application for Oxford Debate tournament management.
To deploy via Docker:
- Set up an
.envfile to configure your deployment. You may use this example and adjust it to your needs:
# Backend setup (for documentation refer to https://github.com/debatecore/tau?tab=readme-ov-file#environment-setup)
DOCKER_DB_PASSWORD=THISISAVERYSECUREDBPASSWORD
DOCKER_DB_ROOT_PASSWORD=ANOTHERSECUREROOTPASSWORD
DATABASE_URL=postgresql://tau:tau@db-prod:5432/tau
SECRET=SUPERSECRETSTRINGHERE
FRONTEND_ORIGIN=http://localhost:3000
# Frontend setup
BACKEND_NAME=server-prod
BACKEND_URL=http://${BACKEND_NAME}:2023 # Used for server-side requests
FRONTEND_PORT=3000 # Port with the frontend to be exposed
BACKEND_PORT=2023 # Port with the backend to be exposed- Then you can simply run:
docker compose --profile prod up -d- Once the containers are built and started, you can access the application from http://localhost:3000 (or other address, depending on your
FRONTEND_PORTvariable).
In this scenario, you will deploy the backend via Docker, allowing you to start the frontend locally, e.g. using a Node development server.
architecture-beta
group your_machine(server)[Your machine]
group docker(cloud)[Docker] in your_machine
service backend_container(server)[tau backend] in docker
service db_container(database)[Postgres database] in docker
service ghcr(cloud)[GitHub Container Registry] in your_machine
service npm(server)[node server] in your_machine
service env(disk)[env or shell variables] in your_machine
backend_container:R -- L:db_container
ghcr:B -- T:backend_container
npm:T -- B:backend_container
env:T -- B:backend_container
env:T -- B:db_container
env:L -- R:npm
- Create an
.envfile containing only backend-related variables, e.g.:
DOCKER_DB_PASSWORD=THISISAVERYSECUREDBPASSWORD
DOCKER_DB_ROOT_PASSWORD=ANOTHERSECUREROOTPASSWORD
DATABASE_URL=postgresql://tau:tau@db-prod:5432/tau
SECRET=SUPERSECRETSTRINGHERE
FRONTEND_ORIGIN=http://localhost:3000- Start the backend:
docker compose --profile dev up -d
- Once the backend is up, you can run the Node development server:
npm run dev- Open http://localhost:3000 with your browser to see the result.