This repository provides ready-to-use CI/CD templates for deploying Django applications with PostgreSQL and Redis using Docker and GitLab CI/CD pipelines.
- Django: Web application framework
- PostgreSQL: Relational database
- Redis: In-memory data store
- Docker Compose: Multi-service orchestration
- GitLab CI/CD: Automated build, test, and deployment pipeline
src/docker-compose.yml: Main Docker Compose configurationsrc/docker-compose.ci.yml: Docker Compose for CI environmentsrc/docker-compose.staging.yml: Docker Compose for staging environmentsrc/Dockerfile: Dockerfile for Django appsrc/entrypoint.sh: Entrypoint script for Django containersrc/.gitlab-ci.yml: GitLab CI/CD pipeline configuration
- Clone the repository
git clone https://github.com/iranailab/Ci-CD-template.git cd Ci-CD-template/src - Configure environment variables as needed for your Django, PostgreSQL, and Redis setup.
- Build and run locally
docker-compose up --build
- Set up GitLab CI/CD
- Push your code to a GitLab repository.
- The
.gitlab-ci.ymlfile will automate build, test, and deployment steps.
- Update the Docker Compose files to match your application's requirements.
- Modify the
.gitlab-ci.ymlstages for your workflow.
This project is licensed under the terms of the LICENSE file in this repository.
Pull requests and issues are welcome!
