devsecops-blog

Conduit Deploy with Docker Compose

Table of Contents

  1. Description
  2. Quickstart
  3. Usage

Description

This repository sets up a multi-container environment using Docker Compose to run both the Conduit Frontend and Conduit Backend applications. The Conduit Frontend is forked from
Developer-Akademie-GmbH/conduit-frontend,
and the Conduit Backend is forked from
https://github.com/Developer-Akademie-GmbH/conduit-backend and integrated as submodules.

Both the frontend and backend are containerized, and Docker Compose is used to orchestrate their operation, ensuring they work seamlessly together. This setup provides a consistent and scalable development environment, simplifying the process of running both applications in parallel.

Quickstart

Prerequisites

Ensure you have the following tools installed:

  1. Clone the repository:

    git clone https://github.com/PascalNehlsen/conduit.git
    cd conduit
    
  2. Copy the example.env file to .env:

    cp example.env .env
    
  3. Init submodules

    git submodule update --init --recursive
    
  4. Build and start the application using Docker Compose:

    docker-compose up --build -d
    
  5. Access the application:

  1. To stop the application, use:
    docker-compose down
    

Usage

Once the application is running, you can interact with the Conduit API via the Backend at http://localhost:8000. The Frontend will communicate with the API to fetch and display data.

Configuration

You need to configure several environment variables for the Django project to work properly. Below is an example of the necessary variables to set in your example.env file:

Variable Description Default value
DJANGO_SUPERUSER_USERNAME The username for the Django admin superuser. admin
DJANGO_SUPERUSER_EMAIL The email address associated with the Django admin superuser. admin@example.com
DJANGO_SUPERUSER_PASSWORD The password for the Django admin superuser adminpassword
SECRET_KEY A crucial security key used by Django for cryptographic signing example.env#SECRET_KEY
DEBUG Set to True for local development to enable debugging features. False
ALLOWED_HOSTS A comma-separated list of allowed hostnames or IP addresses that your Django site can serve. 127.0.0.1, localhost
CORS_ALLOWED_ORIGINS A list of allowed origins for cross-origin requests. http://localhost:8282

Repository: https://github.com/PascalNehlsen/conduit