Skip to content

Lap counting system for the Swim4Love event. It is a web application that allows users to track the swimmers.

License

Notifications You must be signed in to change notification settings

HenryXiaoYang/Swim4LoveV2

Repository files navigation

Swim4Love

This is a project for the Swim4Love event. It is a web application that allows users to track the swimmers.

Installation

Prerequisites

  • Python 3.x
  • pip

Steps

  1. Clone the repository:
git clone https://github.com/HenryXiaoYang/Swim4LoveV2.git
cd Swim4LoveV2
  1. Install Python dependencies:
pip install -r requirements.txt
  1. Edit the .env file to set your secret key:
DJANGO_SECRET_KEY=your_secret_key

Make sure to keep your keys safe!

  1. Edit the Swim4LoveV2/settings.py file if you need to change some Django settings.

  2. Collect static files:

python3 manage.py collectstatic
  1. Migrate the database:
python3 manage.py makemigrations
python3 manage.py migrate
  1. Create a superuser
python3 manage.py createsuperuser

Usage

  1. Run the server:
gunicorn Swim4LoveV2.wsgi -c gunicorn.conf.py
  1. Open your browser and go to http://127.0.0.1:8000/ to view the website.
  2. Use your superuser credentials to log in.

Deploy with Docker

  1. Build the image:
sudo docker build -t henryxiaoyang/swim4lovev2 .
  1. Run the image:
sudo docker run -d \
  --name swim4lovev2 \
  --restart always \
  -v swim4lovev2:/app \
  -e DJANGO_SECRET_KEY=Your-Secret-Key \
  -p 8000:8000 \
  henryxiaoyang/swim4lovev2

or use docker-compose:

version: "3"

services:
  swim4lovev2:
    image: henryxiaoyang/swim4lovev2
    container_name: swim4lovev2
    restart: always
    volumes:
        - swim4lovev2:/app
    environment:
      DJANGO_SECRET_KEY: Your-Secret-Key
    ports:
      - "8000:8000"

volumes:
    swim4lovev2:
docker-compose up -d

About

Lap counting system for the Swim4Love event. It is a web application that allows users to track the swimmers.

Topics

Resources

License

Stars

Watchers

Forks