Skip to content

Commit d409f5c

Browse files
committed
Remove UPDATE_ROUTES_GUIDE.md, update .env.example, and add Docker image build workflow
- Deleted `UPDATE_ROUTES_GUIDE.md` as it is no longer necessary. - Updated `.env.example` with a default `GOOGLE_REDIRECT_URI` placeholder. - Introduced a GitHub Actions workflow for building and pushing the base Docker image. - Added `Base.Dockerfile` with Liberica OpenJRE and Pandoc for future use cases.
1 parent ecab6f8 commit d409f5c

4 files changed

Lines changed: 79 additions & 101 deletions

File tree

.env.example

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Get these from https://console.developers.google.com/
33
GOOGLE_CLIENT_ID=your_google_client_id_here
44
GOOGLE_CLIENT_SECRET=your_google_client_secret_here
5+
GOOGLE_REDIRECT_URI=http://localhost:8080/callback
56

67
# Session sign and encrypt keys
78
# Keys will be generated by the app, if none provided
@@ -16,7 +17,7 @@ KOTBUSTA_POSTGRES_PASSWORD=kotbusta
1617
KOTBUSTA_POSTGRES_DATABASE=kotbusta
1718

1819
# Books data path (required - path to your flibusta data)
19-
# BOOKS_DATA_PATH=/path/to/your/flibusta/books
20+
BOOKS_DATA_PATH=/path/to/your/flibusta/books
2021

2122
# Admin email address used for granting administrative privileges
22-
# ADMIN_EMAIL=your_admin_email_here
23+
ADMIN_EMAIL=your_admin_email_here
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build Base Docker Image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: "Docker image tag"
8+
required: true
9+
default: "latest"
10+
type: string
11+
12+
env:
13+
REGISTRY: ghcr.io
14+
IMAGE_NAME: ${{ github.repository }}-base
15+
16+
jobs:
17+
build-and-push:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Log in to the Container registry
28+
uses: docker/login-action@v3
29+
with:
30+
registry: ${{ env.REGISTRY }}
31+
username: ${{ github.actor }}
32+
password: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Extract metadata
35+
id: meta
36+
uses: docker/metadata-action@v5
37+
with:
38+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
39+
tags: |
40+
type=raw,value=${{ inputs.tag }}
41+
type=raw,value={{date 'YYYYMMDD'}}-${{ inputs.tag }}
42+
43+
- name: Build and push Docker image
44+
uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
file: ./Base.Dockerfile
48+
push: true
49+
tags: ${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}
51+
cache-from: type=gha
52+
cache-to: type=gha,mode=max

Base.Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Base image with Liberica OpenJRE and Pandoc
2+
FROM bellsoft/liberica-openjre-debian:24.0.2
3+
4+
# Install pandoc
5+
RUN apt-get update && \
6+
apt-get install -y pandoc && \
7+
apt-get clean && \
8+
rm -rf /var/lib/apt/lists/*
9+
10+
# Create application user for security
11+
RUN useradd --create-home --shell /bin/bash kotbusta
12+
13+
# Create app and data directories with proper permissions
14+
RUN mkdir -p /app/data && \
15+
chown -R kotbusta:kotbusta /app
16+
17+
# Switch to non-root user
18+
USER kotbusta
19+
20+
# Set working directory
21+
WORKDIR /app
22+
23+
# Expose port (for documentation purposes)
24+
EXPOSE 8080

UPDATE_ROUTES_GUIDE.md

Lines changed: 0 additions & 99 deletions
This file was deleted.

0 commit comments

Comments
 (0)