🔧 Fix: Development environment env.sh Pfade korrigiert

- Kopiert Development-spezifische .env und env.sh ins frontend/ für Volume-Mount
- Aktualisiert .gitignore für Development-Dateien
- Frontend-Container startet jetzt ohne env.sh Fehler
- Development-Server läuft erfolgreich auf Port 3000
This commit is contained in:
Matthias Lotz 2025-11-06 17:26:28 +01:00
parent 2678ad9b12
commit ae67bc7978
3 changed files with 14 additions and 4 deletions

5
.gitignore vendored
View File

@ -27,3 +27,8 @@ build/
# Backend data (uploaded images, database, etc.)
backend/src/data/
# Development-specific files (created by ./dev.sh)
frontend/.env
frontend/env.sh
frontend/env-config.js

View File

@ -12,8 +12,13 @@ WORKDIR /app
# Copy package files first to leverage Docker cache for npm install
COPY frontend/package*.json ./
COPY docker/dev/frontend/config/env.sh ./
COPY docker/dev/frontend/config/.env ./
# Copy environment configuration
COPY docker/dev/frontend/config/env.sh ./env.sh
COPY docker/dev/frontend/config/.env ./.env
# Make env.sh executable
RUN chmod +x ./env.sh
# Copy nginx configuration for development
COPY docker/dev/frontend/nginx.conf /etc/nginx/conf.d/default.conf

View File

@ -26,8 +26,8 @@ EXPOSE 80
# Copy .env file and shell script to container
WORKDIR /usr/share/nginx/html
COPY docker/prod/frontend/config/env.sh ./
COPY docker/prod/frontend/config/.env ./
COPY docker/prod/frontend/config/env.sh ./env.sh
COPY docker/prod/frontend/config/.env ./.env
# Add bash
RUN apk add --no-cache bash