Skip to content

Commit 753b37e

Browse files
authored
Merge pull request #143 from reqcore-inc/fix/docker-image
feat: add Docker support with pre-built image instructions and CI workflow
2 parents d4ceaf8 + 29775cb commit 753b37e

4 files changed

Lines changed: 266 additions & 15 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Publish Docker Image
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ["v*"]
7+
8+
permissions:
9+
contents: read
10+
packages: write
11+
12+
concurrency:
13+
group: docker-publish-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
docker:
18+
name: Build & Push Docker Image
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 30
21+
22+
steps:
23+
# ── 1. Checkout (needed for path context so .dockerignore is respected) ──
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
# ── 2. Multi-platform support ───────────────────────────────────────────
28+
- name: Set up QEMU
29+
uses: docker/setup-qemu-action@v4
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v4
33+
34+
# ── 3. Registry authentication ─────────────────────────────────────────
35+
- name: Log in to GitHub Container Registry
36+
uses: docker/login-action@v4
37+
with:
38+
registry: ghcr.io
39+
username: ${{ github.repository_owner }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Log in to Docker Hub
43+
if: vars.DOCKERHUB_USERNAME != ''
44+
uses: docker/login-action@v4
45+
with:
46+
username: ${{ vars.DOCKERHUB_USERNAME }}
47+
password: ${{ secrets.DOCKERHUB_TOKEN }}
48+
49+
# ── 4. Tag & label generation ──────────────────────────────────────────
50+
- name: Extract Docker metadata
51+
id: meta
52+
uses: docker/metadata-action@v6
53+
with:
54+
images: |
55+
ghcr.io/${{ github.repository }}
56+
name=reqcore/reqcore,enable=${{ vars.DOCKERHUB_USERNAME != '' }}
57+
tags: |
58+
type=edge,branch=main
59+
type=raw,value=latest,enable={{is_default_branch}}
60+
type=semver,pattern={{version}}
61+
type=semver,pattern={{major}}.{{minor}}
62+
type=sha,prefix=sha-
63+
64+
# ── 5. Build & push ────────────────────────────────────────────────────
65+
- name: Build and push
66+
uses: docker/build-push-action@v7
67+
with:
68+
context: .
69+
push: true
70+
platforms: linux/amd64,linux/arm64
71+
tags: ${{ steps.meta.outputs.tags }}
72+
labels: ${{ steps.meta.outputs.labels }}
73+
annotations: ${{ steps.meta.outputs.annotations }}
74+
cache-from: type=gha
75+
cache-to: type=gha,mode=max
76+
provenance: mode=max
77+
sbom: true
78+
env:
79+
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[![E2E Tests](https://github.com/reqcore-inc/reqcore/actions/workflows/e2e-tests.yml/badge.svg)](https://github.com/reqcore-inc/reqcore/actions/workflows/e2e-tests.yml)
99
[![PR Validation](https://github.com/reqcore-inc/reqcore/actions/workflows/pr-validation.yml/badge.svg)](https://github.com/reqcore-inc/reqcore/actions/workflows/pr-validation.yml)
1010
[![Docker Integration](https://github.com/reqcore-inc/reqcore/actions/workflows/docker-readme-validation.yml/badge.svg)](https://github.com/reqcore-inc/reqcore/actions/workflows/docker-readme-validation.yml)
11+
[![Docker Image](https://ghcr-badge.egpl.dev/reqcore-inc/reqcore/latest_tag?trim=major&label=docker)](https://github.com/reqcore-inc/reqcore/pkgs/container/reqcore)
1112

1213
[Live Demo](https://reqcore.com) · [Documentation](ARCHITECTURE.md) · [Roadmap](ROADMAP.md) · [Report Bug](https://github.com/reqcore-inc/reqcore/issues/new)
1314

@@ -62,6 +63,29 @@ Hiring software shouldn't be complicated or expensive. Most applicant tracking s
6263
6364
---
6465

66+
### Option A — Use the pre-built image (fastest)
67+
68+
No cloning, no building. Pull the official image and run:
69+
70+
```bash
71+
mkdir reqcore && cd reqcore
72+
curl -fsSLO https://raw.githubusercontent.com/reqcore-inc/reqcore/main/docker-compose.production.yml
73+
curl -fsSLO https://raw.githubusercontent.com/reqcore-inc/reqcore/main/setup.sh
74+
chmod +x setup.sh
75+
./setup.sh
76+
docker compose -f docker-compose.production.yml up -d
77+
```
78+
79+
Open **[http://localhost:3000](http://localhost:3000)** and sign up. That's it.
80+
81+
To update: `docker compose -f docker-compose.production.yml pull app && docker compose -f docker-compose.production.yml up -d`
82+
83+
---
84+
85+
### Option B — Build from source
86+
87+
---
88+
6589
### Step 1 — Install Docker
6690

6791
Docker packages the app, database, and file storage into containers so you don't have to install anything else manually.
@@ -153,6 +177,15 @@ Then sign in with:
153177

154178
When a new version of Reqcore is released, follow these steps **in order** to update your instance. Your data is safe — updates never delete the database or your uploaded files.
155179

180+
#### Pre-built image users
181+
182+
```bash
183+
docker compose -f docker-compose.production.yml pull app
184+
docker compose -f docker-compose.production.yml up -d
185+
```
186+
187+
#### Build from source users
188+
156189
**Step 1 — Pull the latest code**
157190

158191
```bash

SELF-HOSTING.md

Lines changed: 70 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ Everything you need to deploy, manage, and update your own Reqcore applicant tra
99
1. [What is Self-Hosting?](#what-is-self-hosting)
1010
2. [Why Self-Host Reqcore?](#why-self-host-reqcore)
1111
3. [Requirements](#requirements)
12-
4. [Quick Start (5 Minutes)](#quick-start-5-minutes)
13-
5. [Step-by-Step Installation](#step-by-step-installation)
14-
6. [Updating Your Instance](#updating-your-instance)
15-
7. [Backups & Data Safety](#backups--data-safety)
16-
8. [Custom Domain & HTTPS](#custom-domain--https)
17-
9. [Email Configuration](#email-configuration)
18-
10. [Security Best Practices](#security-best-practices)
19-
11. [Monitoring & Health Checks](#monitoring--health-checks)
20-
12. [Troubleshooting](#troubleshooting)
21-
13. [FAQ](#faq)
12+
4. [Quick Start — Pre-built Image (Fastest)](#quick-start--pre-built-image-fastest)
13+
5. [Quick Start — Build from Source (5 Minutes)](#quick-start--build-from-source-5-minutes)
14+
6. [Step-by-Step Installation](#step-by-step-installation)
15+
7. [Updating Your Instance](#updating-your-instance)
16+
8. [Backups & Data Safety](#backups--data-safety)
17+
9. [Custom Domain & HTTPS](#custom-domain--https)
18+
10. [Email Configuration](#email-configuration)
19+
11. [Security Best Practices](#security-best-practices)
20+
12. [Monitoring & Health Checks](#monitoring--health-checks)
21+
13. [Troubleshooting](#troubleshooting)
22+
14. [FAQ](#faq)
2223

2324
---
2425

@@ -79,9 +80,41 @@ All of these providers offer one-click Docker installation when creating a serve
7980

8081
---
8182

82-
## Quick Start (5 Minutes)
83+
## Quick Start — Pre-built Image (Fastest)
8384

84-
If you have Docker already installed and just want to get running:
85+
Use the official pre-built Docker image from GitHub Container Registry. No cloning, no building — just pull and run:
86+
87+
```bash
88+
# 1. Download just the files you need
89+
mkdir reqcore && cd reqcore
90+
curl -fsSLO https://raw.githubusercontent.com/reqcore-inc/reqcore/main/docker-compose.production.yml
91+
curl -fsSLO https://raw.githubusercontent.com/reqcore-inc/reqcore/main/setup.sh
92+
chmod +x setup.sh
93+
94+
# 2. Generate secure passwords (one-time)
95+
./setup.sh
96+
97+
# 3. Start everything
98+
docker compose -f docker-compose.production.yml up -d
99+
100+
# 4. Open your browser
101+
# → http://localhost:3000
102+
```
103+
104+
That's it. Sign up, create your organization, and start hiring.
105+
106+
**Want to pin a specific version?** Edit `docker-compose.production.yml` and replace `latest` with a version tag (e.g., `1.3.0`):
107+
108+
```yaml
109+
app:
110+
image: ghcr.io/reqcore-inc/reqcore:1.3.0
111+
```
112+
113+
---
114+
115+
## Quick Start — Build from Source (5 Minutes)
116+
117+
If you prefer to build from source (useful for development or customization):
85118
86119
```bash
87120
# 1. Download Reqcore
@@ -98,7 +131,7 @@ docker compose up -d
98131
# → http://localhost:3000
99132
```
100133

101-
That's it. Sign up, create your organization, and start hiring.
134+
Sign up, create your organization, and start hiring.
102135

103136
**Want demo data to explore first?**
104137

@@ -217,9 +250,31 @@ Reqcore includes a built-in update system accessible from the Settings panel. No
217250

218251
The UI shows the progress of each update step and clearly indicates success or failure. Your data is always preserved — database migrations run automatically.
219252

220-
### Method 2: Update from the Command Line
253+
### Method 2: Update from the Command Line (Pre-built Image)
254+
255+
If you're using the pre-built image (`docker-compose.production.yml`):
256+
257+
```bash
258+
# Navigate to your Reqcore directory
259+
cd /path/to/reqcore
260+
261+
# Pull the latest image and restart
262+
docker compose -f docker-compose.production.yml pull app
263+
docker compose -f docker-compose.production.yml up -d
264+
```
265+
266+
To update to a specific version, edit `docker-compose.production.yml` and change the image tag:
267+
268+
```yaml
269+
app:
270+
image: ghcr.io/reqcore-inc/reqcore:1.4.0
271+
```
272+
273+
Then run `docker compose -f docker-compose.production.yml up -d`.
274+
275+
### Method 3: Update from the Command Line (Build from Source)
221276

222-
If you prefer using the terminal, or the UI update isn't available:
277+
If you cloned the repository and build locally:
223278

224279
```bash
225280
# Navigate to your Reqcore directory

docker-compose.production.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# docker-compose.production.yml
2+
#
3+
# Use this file to run Reqcore with the official pre-built Docker image
4+
# instead of building from source. No git clone or local build required.
5+
#
6+
# Quick start:
7+
# 1. Download this file and setup.sh from the repository
8+
# 2. Run: ./setup.sh
9+
# 3. Run: docker compose -f docker-compose.production.yml up -d
10+
# 4. Open: http://localhost:3000
11+
12+
services:
13+
db:
14+
image: postgres:16-alpine
15+
container_name: reqcore_db
16+
restart: unless-stopped
17+
environment:
18+
POSTGRES_USER: ${DB_USER}
19+
POSTGRES_PASSWORD: ${DB_PASSWORD}
20+
POSTGRES_DB: ${DB_NAME}
21+
ports:
22+
- "127.0.0.1:5432:5432" # Postgres — localhost only, never expose publicly
23+
volumes:
24+
- postgres_data:/var/lib/postgresql/data
25+
healthcheck:
26+
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
27+
interval: 5s
28+
timeout: 5s
29+
retries: 10
30+
31+
minio:
32+
image: minio/minio
33+
container_name: reqcore_minio
34+
restart: unless-stopped
35+
ports:
36+
- "127.0.0.1:9000:9000" # S3 API — localhost only, never expose publicly
37+
- "127.0.0.1:9001:9001" # MinIO Console → http://localhost:9001
38+
environment:
39+
MINIO_ROOT_USER: ${STORAGE_USER}
40+
MINIO_ROOT_PASSWORD: ${STORAGE_PASSWORD}
41+
command: server /data --console-address ":9001"
42+
volumes:
43+
- minio_data:/data
44+
healthcheck:
45+
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
46+
interval: 5s
47+
timeout: 5s
48+
retries: 10
49+
50+
app:
51+
image: ghcr.io/reqcore-inc/reqcore:latest
52+
container_name: reqcore_app
53+
restart: unless-stopped
54+
env_file: .env
55+
environment:
56+
# Override localhost URLs with Docker-internal hostnames
57+
DATABASE_URL: postgresql://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_NAME}
58+
S3_ENDPOINT: http://minio:9000
59+
ports:
60+
- "3000:3000"
61+
depends_on:
62+
db:
63+
condition: service_healthy
64+
minio:
65+
condition: service_healthy
66+
volumes:
67+
- backups_data:/data/backups
68+
69+
# Optional DB browser — run with: docker compose -f docker-compose.production.yml --profile tools up
70+
adminer:
71+
image: adminer
72+
container_name: reqcore_adminer
73+
restart: unless-stopped
74+
profiles: [tools]
75+
ports:
76+
- "127.0.0.1:8080:8080" # Adminer → http://localhost:8080
77+
depends_on:
78+
db:
79+
condition: service_healthy
80+
81+
volumes:
82+
postgres_data:
83+
minio_data:
84+
backups_data:

0 commit comments

Comments
 (0)