- Füge Docker-Compose-Konfiguration mit Host-Netzwerk für Frontend und Backend hinzu - Erstelle Dockerfile für das Frontend mit automatischer Datenbankmigration - Aktualisiere Backend-Docker-Compose mit korrekten Umgebungsvariablen - Implementiere Installationsskripte: - install-myp.sh: Vollständige Installation beider Komponenten - start-myp.sh: Starten der installierten Container - stop-myp.sh: Stoppen der Container - setup-backend-env.sh: Einrichten der Backend-Umgebungsvariablen - Korrigiere SQLite-Datenbankprobleme im Frontend 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
532 B
Docker
32 lines
532 B
Docker
FROM node:20-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apk add --no-cache python3 build-base g++ make
|
|
|
|
# Install pnpm
|
|
RUN npm install -g pnpm
|
|
|
|
# Copy package files
|
|
COPY package.json pnpm-lock.yaml ./
|
|
|
|
# Install dependencies
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Create database directory and run migrations
|
|
RUN mkdir -p db/
|
|
RUN pnpm db:generate-sqlite
|
|
RUN pnpm db:migrate
|
|
|
|
# Build the application
|
|
RUN pnpm build
|
|
|
|
# Expose the port
|
|
EXPOSE 3000
|
|
|
|
# Start the application
|
|
CMD ["pnpm", "start"] |