Skip to main content
team-collaboration/version-control/githubGithub

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:

  • Docker

    • Docker Compose was included with Docker versions 20.10 and later, but recently it is no longer included by default. For the latest Docker versions, you will need to install Docker Compose manually as a plugin. Follow the official instructions for detailed steps.
  • For a Frontend Quickstart, refer to the Conduit Frontend README

  • For a Backend Quickstart, refer to the Conduit Backend README

  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:

  • The Frontend should be accessible at http://localhost:8282 in your web browser.
  • The Backend should be accessible at http://localhost:8000/admin in your web browser.
  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:

VariableDescriptionDefault value
DJANGO_SUPERUSER_USERNAMEThe username for the Django admin superuser.admin
DJANGO_SUPERUSER_EMAILThe email address associated with the Django admin superuser.admin@example.com
DJANGO_SUPERUSER_PASSWORDThe password for the Django admin superuseradminpassword
SECRET_KEYA crucial security key used by Django for cryptographic signingexample.env#SECRET_KEY
DEBUGSet to True for local development to enable debugging features.False
ALLOWED_HOSTSA comma-separated list of allowed hostnames or IP addresses that your Django site can serve.127.0.0.1, localhost
CORS_ALLOWED_ORIGINSA list of allowed origins for cross-origin requests.http://localhost:8282