diff --git a/.gitignore b/.gitignore index b615e14..d34cd85 100644 --- a/.gitignore +++ b/.gitignore @@ -172,3 +172,6 @@ cython_debug/ # Misc .DS_Store + +# Node packages +node_modules diff --git a/Dockerfile b/Dockerfile index 56392b2..6c5613b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,14 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 +# Add nodejs v22 +RUN apt-get update \ + && apt-get install -y curl gnupg \ + && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ + && apt-get install -y nodejs \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + WORKDIR /app # Copy the project into the image @@ -16,4 +24,4 @@ RUN find /app -name "*.sqlite3" -delete # Sync the project into a new environment, using the frozen lockfile RUN uv sync --frozen -ENTRYPOINT [ "/app/entrypoint.sh" ] \ No newline at end of file +ENTRYPOINT [ "/app/entrypoint.sh" ] diff --git a/deploy_prod.sh b/deploy_prod.sh index e3e4d37..44100d7 100755 --- a/deploy_prod.sh +++ b/deploy_prod.sh @@ -24,6 +24,7 @@ mkdir -p ${LOG_DIR} # update changes before update # git pull +npm install source .venv/bin/activate uv sync cd pythonkr_backend diff --git a/entrypoint.sh b/entrypoint.sh index ae8a931..cf053cd 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,6 +2,7 @@ cd /app +npm install source .venv/bin/activate uv sync cd /app/pythonkr_backend diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..3ab7697 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,102 @@ +{ + "name": "python.or.kr-wip", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "cross-env": "^7.0.3" + } + }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..9fbce2c --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "cross-env": "^7.0.3" + } +} diff --git a/pythonkr_backend/fixtures.json b/pythonkr_backend/fixtures.json index 232129e..30db336 100644 --- a/pythonkr_backend/fixtures.json +++ b/pythonkr_backend/fixtures.json @@ -17,40 +17,14 @@ } }, { - "model": "wagtailcore.page", + "model": "wagtailcore.site", "pk": 1, "fields": { - "path": "0001", - "depth": 1, - "numchild": 1, - "translation_key": "0bddbb0f-7275-4646-81a5-c89de32daa6c", - "locale": 1, - "latest_revision": null, - "live": true, - "has_unpublished_changes": false, - "first_published_at": null, - "last_published_at": null, - "live_revision": null, - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "locked_at": null, - "locked_by": null, - "title": "Root", - "draft_title": "Root", - "slug": "root", - "content_type": [ - "wagtailcore", - "page" - ], - "url_path": "/", - "owner": null, - "seo_title": "", - "show_in_menus": false, - "search_description": "", - "latest_revision_created_at": null, - "alias_of": null + "hostname": "localhost", + "port": 80, + "site_name": "", + "root_page": 3, + "is_default_site": true } }, { diff --git a/pythonkr_backend/theme/static_src/tailwind.config.js b/pythonkr_backend/theme/static_src/tailwind.config.js index 29a4b92..9485bc6 100644 --- a/pythonkr_backend/theme/static_src/tailwind.config.js +++ b/pythonkr_backend/theme/static_src/tailwind.config.js @@ -51,15 +51,7 @@ module.exports = { * comment the line below to disable '@tailwindcss/forms'. */ require('@tailwindcss/forms'), -plugins: [ - /** - * '@tailwindcss/forms' is the forms plugin that provides a minimal styling - * for forms. If you don't like it or have own styling for forms, - * comment the line below to disable '@tailwindcss/forms'. - */ - require('@tailwindcss/forms'), - require('@tailwindcss/typography'), - require('@tailwindcss/aspect-ratio'), -], + require('@tailwindcss/typography'), + require('@tailwindcss/aspect-ratio'), ], }