Skip to content

Blodroed/betauia.net

 
 

Repository files navigation

BetaWEB

Overview

Description: The student organization Beta's website.

Purpose: BetaDEV is trying to improve the old website.

Table of Contents


Installation and running a fullstack server with docker

These are the steps you need to do to run a fullstack development server on your local machine 🧙‍♂️!

Prerequisites

  • Git: Used to clone the repository, download here.
  • Docker: Used to create and run containers, download here.
  • Docker Compose: Used to define and run multi-container Docker applications, included in Docker Desktop (or follow the installation instructions).

Steps

  1. Clone the repository:
git clone https://github.com/betauia/betauia.net
  1. Navigate to the project directory:
cd betauia.net
  1. Copy environment variables and edit them as needed:
cp .env.example .env
  1. Build and start the Docker containers:
docker compose up --build

Usage

Running the application

  • Start the application:
docker compose up  # Use -d to run detached

Access the application at port 3000 (frontend) and 8000 (backend). If ENV is set to production, the Astro project will be built to frontend/dist/ and can be hosted via Nginx.

Stopping the application

  • Stop the application:
docker compose down

Additional Docker Commands

  • To view running containers:
docker compose ps
  • To build containers:
docker compose build
  • To remove volumes:
docker compose down -v
  • To access the shell of the container (N.B.! intended be used for troubleshooting, e.g. check if something is installed correctly after compose up)
docker exec -it <container_name_or_id> sh

Troubleshooting

this section is for troubleshooting steps that might be relevant

Problem with development server

Sometimes a flush of the volumes fixes most of the problems one might encounter in the project. Simply run this command in the terminal:

docker compose down -v

Troubleshooting

Q: I got an error where the docker container can't find a module, and I did not add any modules

A: This is probably because you built the images before and therefore some residual images for the container is still present. To resolve this run:

docker compose down -v

This ensures all images are removed ensuring you can start the server from scratch starting from installation step 4 after a node.js package update

About

This fork focuses on the BetaLAN part of the betauia.net website

Resources

Contributing

Stars

Watchers

Forks

Languages

  • Astro 94.1%
  • JavaScript 3.0%
  • CSS 1.4%
  • Python 1.1%
  • Dockerfile 0.4%