- Introduction
- Project Structure
- Quickstart
- Environment Variables
- CI/CD Deployment
- Usage
- Logging
- Checklist
- Contact
This repository contains the deployment and CI/CD setup for the
Conduit full-stack application (Angular frontend + Django REST backend).
The main focus of this project is:
- containerization using Docker
- orchestration with Docker Compose
- automated build & deployment via GitHub Actions
- secure handling of configuration and secrets
The frontend and backend are integrated as Git submodules and are built automatically during the CI pipeline.
conduit-deployment/
├── docker-compose.yaml
├── .gitmodules
├── backend/ # Django backend (git submodule)
├── frontend/ # Angular frontend (git submodule)
├── .github/
│ └── workflows/
│ └── deployment.yaml # GitHub Actions CI/CD pipeline
├── .env.template
└── README.md
git clone --recurse-submodules https://github.com/BenjaminTietz/conduit-deployment.git
cd conduit-deploymentIf submodules were not cloned:
git submodule update --init --recursiveAll backend and frontend configuration values are defined in a single .env
file located in the project root.
cp .env.template .envModify if needed.
docker-compose upBackend → http://localhost:8000
Frontend → http://localhost:8282
The application is configured via a .env file.
An example configuration is provided in
.env.template
Copy the template and adjust the values as needed:
cp env.template .env
---
## CI/CD Deployment
The deployment pipeline is implemented using **GitHub Actions**.
**Workflow responsibilities:**
- Build frontend and backend Docker images
- Inject frontend configuration at build time
- Push images to GitHub Container Registry (GHCR)
- Deploy containers to a remote VM via SSH
- Start services using Docker Compose in detached mode
No build steps are executed on the target VM.
## Usage
### Backend (Django)
Run inside the backend container:
docker exec -it conduit_backend bash python manage.py createsuperuser
---
### Frontend (Angular)
The production build is embedded in an NGINX container and served at:
---
## Logging
All services log to stdout/stderr and are managed by Docker's json-file logging driver.
Log rotation is enabled to prevent excessive disk usage.
Logs can be accessed via:
```bash
docker logs conduit_backend
docker logs conduit_frontend
Logs can optionally be persisted by redirecting Docker logs to a file.
docker logs conduit_backend > conduit_backend-logs.txt
docker logs conduit_frontend > conduit_frontend-logs.txt
Benjamin Tietz
- Portfolio: https://benjamin-tietz.com
- Mail: mail@benjamin-tietz.com