Skip to content

Commit bb9af02

Browse files
committed
Fix Docker build and database initialization
1 parent 1a62423 commit bb9af02

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ RUN apk add --no-cache sqlite
3434
COPY --from=builder /app/server ./server
3535
COPY --from=builder /app/app.js ./app.js
3636

37-
# Create directories (database will be created at runtime)
38-
RUN mkdir -p logs database
37+
# Create directories and initialize database
38+
RUN mkdir -p logs server/database && \
39+
touch server/database/mcq_system.db && \
40+
sqlite3 server/database/mcq_system.db < server/database/init.sql
3941

4042
# Set environment
4143
ENV NODE_ENV=production

0 commit comments

Comments
 (0)