Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,22 @@ WORKDIR /app

# Copy the Rust backend binary
COPY --from=backend-builder /app/target/release/Calendar-Curator /app/calendar-curator
RUN chgrp 0 /app/calendar-curator && chmod g+rx /app/calendar-curator

# Copy the built frontend
COPY --from=frontend-builder /app/frontend/.next/standalone ./frontend/
COPY --from=frontend-builder /app/frontend/.next/static ./frontend/.next/static
COPY --from=frontend-builder /app/frontend/public ./frontend/public
RUN chgrp -R 0 ./frontend && chmod -R g+rwX ./frontend

COPY ./start.sh /app/start.sh
RUN chgrp 0 /app/start.sh && chmod g+rx /app/start.sh

# Create data directory for persistent storage
RUN mkdir -p /app/data
RUN mkdir -p /app/data && chgrp 0 /app/data && chmod g+rwX /app/data

RUN chgrp -R 0 /app \
&& chmod -R g+rwX /app

# Set environment variables
ENV DATABASE_PATH=/app/data/calendars.json
Expand Down
4 changes: 2 additions & 2 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ cd frontend
export NODE_ENV=production
export PORT=3000
export HOSTNAME="0.0.0.0"
node server.js &
node server.js --hostname $HOSTNAME &
FRONTEND_PID=$!

# Wait for both processes
wait $BACKEND_PID $FRONTEND_PID
wait $BACKEND_PID $FRONTEND_PID