diff --git a/.gitignore b/.gitignore index ff18e6b..debf398 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ node_modules/ coverage/ .env +database.sqlite /test-results/ /playwright-report/ /playwright-screenshots/ diff --git a/Dockerfile b/Dockerfile index 84fbc81..8368652 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,9 +64,6 @@ WORKDIR /app # Copy custom combined_server.js that combines frontend and backend COPY combined_server.js ./ -# Switch to non-root user -USER nextjs - # Expose the port EXPOSE 8000 diff --git a/backend/.gitignore b/backend/.gitignore index de5fee4..8f31ed2 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -1,4 +1,3 @@ node_modules/ .env -database.sqlite public/uploads/ diff --git a/backend/config/config.js b/backend/config/config.js new file mode 100644 index 0000000..790e93b --- /dev/null +++ b/backend/config/config.js @@ -0,0 +1,18 @@ +const path = require('path'); + +const databasePath = path.resolve(__dirname, '../../database/database.sqlite'); + +module.exports = { + development: { + dialect: 'sqlite', + storage: databasePath, + }, + test: { + dialect: 'sqlite', + storage: databasePath, + }, + production: { + dialect: 'sqlite', + storage: databasePath, + } +}; diff --git a/backend/config/config.json b/backend/config/config.json deleted file mode 100644 index 339460d..0000000 --- a/backend/config/config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "development": { - "dialect": "sqlite", - "storage": "database/database.sqlite" - }, - "test": { - "dialect": "sqlite", - "storage": "database/database.sqlite" - }, - "production": { - "dialect": "sqlite", - "storage": "../database/database.sqlite" - } -} diff --git a/docker-compose.yaml b/docker-compose.yaml index facb97f..1e2eb78 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,8 +1,7 @@ -version: '3.8' - services: unittcms: image: unittcms:latest + build: . ports: - '8000:8000' environment: