Skip to content

Commit 16e9025

Browse files
authored
Merge pull request #1 from thlurte/dev
Termolio Dynamic Templating Module
2 parents 5f1f4a6 + 869b6f2 commit 16e9025

24 files changed

+8223
-1331
lines changed

.github/config.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Global configuration for Termolio
2+
site:
3+
name: "Termolio"
4+
description: "A terminal-style portfolio and blog"
5+
author: "Your Name"
6+
url: "https://termolio.example.com"
7+
8+
theme:
9+
syntax_highlighting: "dracula"
10+
terminal_theme: "dark"
11+
font_family: "monospace"
12+
13+
content:
14+
articles_path: "content/articles"
15+
projects_path: "content/projects"
16+
max_recent_items: 5
17+
18+
terminal:
19+
prompt_symbol: ""
20+
default_path: "/"
21+
welcome_message: "Welcome to Termolio! Type `help` to see available commands."
22+
23+
navigation:
24+
show_breadcrumbs: true
25+
enable_autocomplete: true
26+
history_limit: 100

.github/workflows/main.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Build the Docker image
18+
run: docker build . --file Dockerfile.prod --tag my-image-name:$(date +%s)

Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Stage 1: Build the React application
2+
FROM node:20-alpine AS builder
3+
WORKDIR /app
4+
5+
# Copy package.json and package-lock.json
6+
COPY package*.json ./
7+
8+
# Install dependencies
9+
RUN npm install
10+
11+
# Copy the rest of the application source code
12+
COPY . .
13+
14+
# Build the application
15+
RUN npm run build
16+
17+
# Stage 2: Serve the application with Vite
18+
FROM node:20-alpine
19+
WORKDIR /app
20+
21+
# Copy built assets and package files from the builder stage
22+
COPY --from=builder /app/dist ./dist
23+
COPY --from=builder /app/package*.json ./
24+
COPY --from=builder /app/vite.config.ts ./
25+
26+
# Install dependencies to run the preview server
27+
RUN npm install
28+
29+
# Expose the port Vite preview runs on
30+
EXPOSE 4173
31+
32+
# Start the Vite preview server
33+
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0"]

Dockerfile.dev

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Development Dockerfile
2+
FROM node:20-alpine
3+
WORKDIR /app
4+
5+
# Copy package.json and package-lock.json
6+
COPY package*.json ./
7+
8+
# Install dependencies
9+
RUN npm install
10+
11+
# Copy the rest of the application source code
12+
COPY . .
13+
14+
# Expose the Vite development server port
15+
EXPOSE 5173
16+
17+
# Start the development server
18+
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]

Dockerfile.prod

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Stage 1: Build the React application
2+
FROM node:20-alpine AS builder
3+
WORKDIR /app
4+
5+
# Copy package.json and package-lock.json
6+
COPY package*.json ./
7+
8+
# Install dependencies
9+
RUN npm install
10+
11+
# Copy the rest of the application source code
12+
COPY . .
13+
14+
# Build the application
15+
RUN npm run build
16+
17+
# Stage 2: Serve the application with Vite
18+
FROM node:20-alpine
19+
WORKDIR /app
20+
21+
# Copy built assets and package files from the builder stage
22+
COPY --from=builder /app/dist ./dist
23+
COPY --from=builder /app/package*.json ./
24+
COPY --from=builder /app/vite.config.ts ./
25+
26+
# Install dependencies to run the preview server
27+
RUN npm install
28+
29+
# Expose the port Vite preview runs on
30+
EXPOSE 4173
31+
32+
# Start the Vite preview server
33+
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0"]

0 commit comments

Comments
 (0)