This README provides step-by-step instructions on how to set up and run the project.
Before you begin, ensure you have the following prerequisites installed on your system:
- Python (>= 3.11)
- pip (Python package manager)
- Virtualenv (optional, but recommended)
-
Clone the repository:
git clone git@github.com:devopshobbies/gitlabci-tutorial.git cd gitlabci-tutorial
-
Create a virtual environment (optional but recommended):
python -m venv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
-
-
Install project dependencies:
pip install -r requirements.txt
-
Apply migrations to create database tables:
python manage.py migrate python maange.py makemigrations
-
Create a superuser for the Django admin panel:
python manage.py createsuperuser
-
Start the development server:
python manage.py runserver
-
Open your web browser and go to
http://127.0.0.1:8000/
to access the Django application. -
Access the Django admin panel at
http://127.0.0.1:8000/admin/
and log in using the superuser credentials you created earlier.
simple_app/
- Django project directory.app/
- Django app directory (you can have multiple apps).manage.py
- Django management script.requirements.txt
- List of Python dependencies.docker-compoe.yml
- Run the project using the Docker container platform.Dockerfile
- Build the project using the Docker container platform.gitlab-ci.yml
- CI/CD file using GitlabCI.db.sqlite3
- Default database SQLite, but you can change it.
If you would like to contribute to this project, please feel free to contribute.