mirror of
https://github.com/andwati/andwati.com.git
synced 2026-10-18 09:22:53 +00:00
apps/cms/Dockerfile.dev + root docker-compose.yml give a one-command way to run the CMS in a container for testing (docker compose up cms), with the shared content/ directory mounted so it matches the host dev setup. apps/cms/Dockerfile is a production multi-stage build for later Dokploy deployment. Uses node:24-bookworm-slim to match the local Node version and get glibc prebuilt binaries for better-sqlite3 without needing a native build toolchain in the final image. Verified: both images build, the dev container boots Strapi successfully, admin panel and API routes are reachable, and the mounted content/ volume resolves at the same relative path the future sync provider will expect.
33 lines
1017 B
YAML
33 lines
1017 B
YAML
# Local-only convenience for running Strapi in a container while developing.
|
|
# Not a production deployment manifest. Usage: docker compose up cms
|
|
#
|
|
# The dev credentials below are throwaway values for a local SQLite instance
|
|
# only — never reuse them anywhere real.
|
|
services:
|
|
cms:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/cms/Dockerfile.dev
|
|
ports:
|
|
- "1337:1337"
|
|
environment:
|
|
HOST: 0.0.0.0
|
|
PORT: "1337"
|
|
NODE_ENV: development
|
|
APP_KEYS: devkey1,devkey2,devkey3,devkey4
|
|
API_TOKEN_SALT: dev-api-token-salt
|
|
ADMIN_JWT_SECRET: dev-admin-jwt-secret
|
|
TRANSFER_TOKEN_SALT: dev-transfer-token-salt
|
|
JWT_SECRET: dev-jwt-secret
|
|
ENCRYPTION_KEY: dev-encryption-key
|
|
volumes:
|
|
- ./apps/cms/src:/app/apps/cms/src
|
|
- ./apps/cms/config:/app/apps/cms/config
|
|
- ./apps/cms/public:/app/apps/cms/public
|
|
- ./apps/cms/database:/app/apps/cms/database
|
|
- ./content:/app/content
|
|
- cms_data:/app/apps/cms/.tmp
|
|
|
|
volumes:
|
|
cms_data:
|