- Set your enviromental variables. This can be done by creating a
.env
file or by editingdocker-compose.yml
- Make sure to change the DB password to something else in
docker-compose.yml
- Then run
docker-compose up
This will automatically pull the latest docker container from GitHub Container Registry
You can also pull the image from Docker Hub, but the main location is now GitHub
- Create/Edit
.env
to set the default variables you want - Remove the username (lambarchie) from the competition manager image line or you will not use your version.
- If you want to edit the variables on a specific deployment you can set an enviromental variable via
docker-compose.yml
to change the config - Make sure to change the DB password to something else, either using the
.env
file or setting it indocker-compose.yml
- Then run
git clone https://github.com/LambArchie/Competition-Manager.git
docker build -t competition-manager .
docker-compose up
- Python 3 (3.7 and above only is offically supported)
pip
&venv
for the same version above
- Postgres (if using in production)
- psycopg2 (Postgres connector) - Requirements
libpq-dev
build-essentials
gcc
python3-dev
(for the version of python used e.g.python3.7-dev
)- If cannot install the requirements above replace psycopg2 in
requirements.txt
with psycopg2-binary. However random segfaults may occur as described on psycopg2 blog
- psycopg2 (Postgres connector) - Requirements
- To change the config edit
.env
or set it as an enviromental variable - To use postgres
- Set
DATABASE_URL
topostgresql+psycopg2://PostgresUser:PostgresPassword@PostgresHost/TableName
ensuring the values are changed to your settings. - To use another database provider change
DATABASE_URL
to the relevant SQLAlchemy value. However at this time, apart from postgres and SQLite no active support will be given to the other database providers.
- Set
git clone https://github.com/LambArchie/Competition-Manager.git
# venv is recommened to ensure dependances are not updated by other applications
python3 -m venv venv
source venv/bin/activate
# Install python modules using pip.
pip3 install -r requirements.txt
# Run application
gunicorn --bind 0.0.0.0:5000 CompetitionManger:app
- Go to
/setup
to register the initial admin account - Put a reverse-proxy which can serve HTTPS in front of the application.
E.g. traefik, nginx, caddy, haproxy. This is also recommended for the docker image.
- Create a file at
app/home/templates/custom-index.html
and this will be used instead of the default homepage. - I have includes two other hompages which can be customised to suit your needs.
- Carousel contains a slideshow. To add images to it place files in
app/home/files/img/
- Cover uses the background image found at
app/home/files/img/background.jpg
. The file used can be changed by editing cover.css then minifying and updating the integrity insidecustom-index.html
- Using docker you can mount a volume at these locations, allowing you to easily use this feature.
- Carousel contains a slideshow. To add images to it place files in