Skip to content

Website voor `Heds Up For Life!`: het team dat de Stelvio gaat beklimmen om geld in te zamelen!!

Notifications You must be signed in to change notification settings

marcelhekking/hedsupforlife

Repository files navigation

Heds Up For Life!

Content

Installation

Local installation and development

Clone the Git repo into a local folder:

git clone [email protected]:marcelhekking/hedsupforlife.git

Running the container in production mode locally

With Docker, you can start a container in production mode.

Changing the group of public static and media folders

The web Docker performs actions under GI 1024 (e.g., running collectstatic). In the Docker files, a physical volume on the host is linked with folders inside Docker. To avoid permission errors:

  • Create a public folder at the project level (next to src)
  • Create staticfiles and mediafiles folders and run the following for both folders:
mkdir -p public/staticfiles && mkdir -p public/mediafiles

and execute the following make command (https://www.gnu.org/software/make/):

make 1024
Starting the containers

Go to the root of the project (hedsupforlife) and first (only to be done once) build the dev container with:

sudo docker build -t hedsupforlife-web:latest -f Dockerfile .

Then start the container with:

make docker

and shut id down with:

make down

Running the Django development server locally

Install the frontend:

yarn install

Create a Python virtual environmnet will all dependencies specified in the pyproject.toml installed:

uv sync

Create a database:

createdb hedsupforlife

Migrate the database and install a superuser. This is the admin as specified in base.py.

make rebuild

Start the Django development server

make runserver

Installing Pre-commit

Pre-commit is a Python package to check code via git hooks before it ends up in a Git repo. Before committing, you need to install pre-commit. In the correct Python virtual environment, go to the root of the project (hedsupforlife) and run:

pre-commit install

To test, you can check existing files with pre-commit:

pre-commit run --all-files

Creating a minified bundle of JS and CSS files

For modifying and effectively creating CSS and JS files, watchify is used. Changes to CSS and JS are observed and converted into a minified bundle. This minified bundle is deployed to production.

Requirements

The following Node.js applications must be installed:

  • browserify
  • watchify
  • uglify-js
  • browserify-css

All dependencies can be installed with the yarn install command in the root of the project:

cd ~/../hedsupforlife$
yarn install

Start watchify to create a minified bundle 'on-the-fly':

cd ~/../hedsupforlife$
yarn run watchify

About

Website voor `Heds Up For Life!`: het team dat de Stelvio gaat beklimmen om geld in te zamelen!!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published