A simple Python project to get you started with web development and testing using Docker and GitHub Actions.
- Python 3.8
- Docker
- Docker Compose
git clone https://github.com/yourusername/hackathon-starter.git
cd hackathon-starter
DB_USER=postgres
DB_PASSWORD=postgres
DB_HOST=db
DB_NAME=postgres
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
docker-compose up --build
pytest test/api.py # to test the API
docker exec hackathon-starter_web_1 pytest test/api.py # to test the database inside the container
docker-compose down
This project uses GitHub Actions for CI.
The workflow is defined in .github/workflows/main.yml
.
It sets up a Python environment, installs the dependencies, runs Docker Compose, and runs the tests.
The workflow is triggered on every push to the main
branch.
To use GitHub Actions in your repository, you need to add secrets to your repository settings:
DB_HOST
DB_USER
DB_PASSWORD
DB_NAME
This project is licensed under the terms of the MIT license. See the LICENSE file for details.