From 13e0727914ecc79625d5571ff8ee1e92e22ee679 Mon Sep 17 00:00:00 2001 From: kimatata <117462761+kimatata@users.noreply.github.com> Date: Sun, 25 May 2025 08:56:43 +0900 Subject: [PATCH] fix: docker-compose up command fails (#227) --- .gitignore | 1 + Dockerfile | 3 --- backend/.gitignore | 1 - backend/config/config.js | 18 ++++++++++++++++++ backend/config/config.json | 14 -------------- docker-compose.yaml | 3 +-- 6 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 backend/config/config.js delete mode 100644 backend/config/config.json 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: