Merge pull request #10 from Ryderjj89/dev

Rearranged how the sqlite database is stored for better volume mounting
This commit is contained in:
Joshua Ryder
2025-06-04 17:39:04 -04:00
committed by GitHub
2 changed files with 6 additions and 5 deletions

View File

@@ -30,11 +30,12 @@ FROM node:18-alpine
WORKDIR /app
# Create necessary directories and set permissions
RUN mkdir -p /app/uploads/wallpapers && \
touch /app/database.sqlite && \
RUN mkdir -p /app/uploads/wallpapers /app/database && \
touch /app/database/database.sqlite && \
chown -R node:node /app && \
chmod 755 /app/uploads && \
chmod 644 /app/database.sqlite
chmod 755 /app/database && \
chmod 644 /app/database/database.sqlite
# Copy backend package files and install dependencies
COPY backend/package*.json ./

View File

@@ -57,7 +57,7 @@ interface RSVP {
async function connectToDatabase() {
try {
// Database file will be in the app directory
const dbPath = path.join(__dirname, '../database.sqlite');
const dbPath = path.join(__dirname, '../database/database.sqlite');
db = await open({
filename: dbPath,