mirror of
https://github.com/appen-isen/projet-cal.git
synced 2026-01-18 16:47:38 +01:00
fix: docker path
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -31,16 +31,22 @@ ENV TZ=Europe/Paris
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the built binary from builder
|
||||
COPY --from=backend-builder /app/backend/main .
|
||||
COPY --from=backend-builder /app/backend/main ./backend/main
|
||||
|
||||
# Copy frontend files
|
||||
COPY frontend/ ./frontend/
|
||||
|
||||
# Copy backend data file
|
||||
COPY backend/date_link.txt ./
|
||||
COPY backend/date_link.txt ./backend/date_link.txt
|
||||
|
||||
# Create .env file to prevent crash in API handler
|
||||
RUN echo "FILE_NAME=date_link.txt" > ./backend/.env
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8080
|
||||
|
||||
# Set working directory to backend so relative paths work
|
||||
WORKDIR /app/backend
|
||||
|
||||
# Run the application
|
||||
CMD ["./main"]
|
||||
|
||||
@@ -13,5 +13,5 @@ services:
|
||||
- GIN_MODE=release
|
||||
volumes:
|
||||
# Mount date_link.txt so you can update it without rebuilding
|
||||
- ./backend/date_link.txt:/app/date_link.txt:ro
|
||||
- ./backend/date_link.txt:/app/backend/date_link.txt:ro
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user