Deploying CoreHead using Docker is the fastest way to get a production-ready environment. This guide will walk you through setting up the Go backend, Next.js frontend, and PostgreSQL database using a single orchestration file.
Prerequisites
Before you begin, ensure you have the following installed on your machine:
- Docker Desktop (v4.0 or later)
- Git (for cloning the repository)
- A code editor like VS Code
Step 1: Clone the Repository
First, clone the official CoreHead Docker starter kit. This repository contains the pre-configured docker-compose.yml file.
git clone https://github.com/corehead/docker-starter.git
cd corehead-docker
Step 2: Configure Environment Variables
CoreHead requires a few environment variables to connect the Go backend to the PostgreSQL database. Create a copy of the example environment file:
cp .env.example .env
Open the .env file and update the following security keys:
JWT_SECRET- Set this to a long random string.DB_PASSWORD- Set a secure database password.
Step 3: Run with Docker Compose
Once configured, you can spin up the entire stack with a single command. This will pull the images and start the services in detached mode.
docker-compose up -d
Note: The first time you run this, it may take a few minutes to download the base images for Go and Node.js.
Step 4: Verify Deployment
Once the containers are running, you can access your dashboard:
- Frontend: http://localhost:3000
- API Health Check: http://localhost:8080/health
Troubleshooting
If the containers fail to start, check the logs using:
docker-compose logs -f


