Skip to content

Commit d813bf7

Browse files
authored
Merge pull request #55 from reactome/Docker
Added docker files
2 parents b88d1d2 + 115b14f commit d813bf7

File tree

4 files changed

+30091
-0
lines changed

4 files changed

+30091
-0
lines changed

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
.angular
3+
.git
4+
dist
5+
.vscode
6+
npm-debug.log
7+
# Add these for TinaCMS
8+
.tina/__generated__
9+
.tina/out

Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM node:22
2+
3+
WORKDIR /app
4+
5+
# 1. Install Global Tools
6+
RUN npm install -g @angular/cli@19 tsx
7+
8+
# 2. Copy Package files
9+
COPY package*.json ./
10+
11+
# 3. Inject the Host/Poll flags directly into the package.json scripts
12+
# This prevents the "Invalid Option: --host" error
13+
RUN sed -i 's/ng serve/ng serve --host 0.0.0.0 --poll 2000/g' package.json
14+
15+
# 4. Install Dependencies
16+
RUN npm install --legacy-peer-deps --ignore-scripts
17+
18+
# 5. Copy the rest of the code
19+
COPY . .
20+
21+
# Expose the ports
22+
EXPOSE 4200
23+
EXPOSE 4001
24+
25+
# We use "npm run dev:serve" but pass the flags through the -- separator
26+
CMD npx tsx projects/website-angular/src/scripts/generate-index.ts && \
27+
npx tinacms dev --rootPath projects/website-angular -c "ng serve --host 0.0.0.0 --poll 2000 --disable-host-check"

docker-compose.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
services:
2+
app:
3+
build: .
4+
ports:
5+
- "4200:4200"
6+
- "4001:4001"
7+
volumes:
8+
- .:/app
9+
- /app/node_modules
10+
# This ensures the nested tina folder is visible to the watcher
11+
- ./projects/website-angular/tina:/app/projects/website-angular/tina
12+
environment:
13+
- NG_CLI_ANALYTICS=false
14+
- NODE_ENV=development
15+
stdin_open: true
16+
tty: true

0 commit comments

Comments
 (0)