DevOps Config

This commit is contained in:
2026-01-30 10:24:07 +02:00
commit b7167bb856
4 changed files with 98 additions and 0 deletions

4
.dockerignore Normal file
View File

@@ -0,0 +1,4 @@
node_modules
dist
.env
.git

35
.gitignore vendored Normal file
View File

@@ -0,0 +1,35 @@
# Dependencies
node_modules/
.bun/
bun.lockb # Optional: Keep this if you want consistent versions across team,
# but ignore if you want Bun to regenerate it locally.
# Build output
dist/
dist-ssr/
*.local
# Environment variables (Crucial for security!)
.env
.env.local
.env.*.local
# Docker logs and data
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
data/
letsencrypt/
mih_monitor/
# IDE / System files
.DS_Store
.vscode/
.idea/
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
# Stage 1: Build the app
FROM oven/bun:latest AS builder
WORKDIR /app
COPY package.json bun.lockb ./
RUN bun install
#--frozen-lockfile
COPY . .
RUN bun run build
# Stage 2: Serve with Nginx
FROM nginx:alpine
# Copy the build output from Vite (usually the 'dist' folder)
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

41
docker-compose.yml Normal file
View File

@@ -0,0 +1,41 @@
version: '3.8'
services:
#============== React Application ====================================================================
app-frontend:
build: .
container_name: golden-silk-app
restart: unless-stopped
ports:
- "8080:80" # This allows access via http://localhost:8080
networks:
- taylor-network
#============== Proxy Manager ====================================================================
nginx-proxy:
image: 'jc21/nginx-proxy-manager:latest'
container_name: nginx-proxy-manager
restart: unless-stopped
ports:
- '80:80' # Public HTTP
- '443:443' # Public HTTPS
- '81:81' # Admin UI
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
networks:
- taylor-network
#============== MIH-Monitor Portainer ====================================================================
mih-monitor:
container_name: mih-monitor
image: portainer/portainer-ce:2.20.3
ports:
- 9444:9443
volumes:
- ./mih_monitor/data:/data
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
networks:
- taylor-network
networks:
taylor-network:
driver: bridge