Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
.angular
.git
dist
.vscode
npm-debug.log
# Add these for TinaCMS
.tina/__generated__
.tina/out
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM node:22

WORKDIR /app

# 1. Install Global Tools
RUN npm install -g @angular/cli@19 tsx

# 2. Copy Package files
COPY package*.json ./

# 3. Inject the Host/Poll flags directly into the package.json scripts
# This prevents the "Invalid Option: --host" error
RUN sed -i 's/ng serve/ng serve --host 0.0.0.0 --poll 2000/g' package.json

# 4. Install Dependencies
RUN npm install --legacy-peer-deps --ignore-scripts

# 5. Copy the rest of the code
COPY . .

# Expose the ports
EXPOSE 4200
EXPOSE 4001

# We use "npm run dev:serve" but pass the flags through the -- separator
CMD npx tsx projects/website-angular/src/scripts/generate-index.ts && \
npx tinacms dev --rootPath projects/website-angular -c "ng serve --host 0.0.0.0 --poll 2000 --disable-host-check"
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
app:
build: .
ports:
- "4200:4200"
- "4001:4001"
volumes:
- .:/app
- /app/node_modules
# This ensures the nested tina folder is visible to the watcher
- ./projects/website-angular/tina:/app/projects/website-angular/tina
environment:
- NG_CLI_ANALYTICS=false
- NODE_ENV=development
stdin_open: true
tty: true
Loading
Loading