Skip to content
Open
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
89 changes: 50 additions & 39 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,45 +1,56 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

#ios files


#android files


#capactior config


# production
/build

# misc
.DS_Store
*.pem

# debug
# Node.js dependencies
node_modules/
yarn.lock
package-lock.json

# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local
# Environment variables
.env
.env.local
.env.*.local

# Docker
docker-compose.override.yml
*.env
*.pid
*.seed
docker-data/
docker-compose.override.yml

# Build output
dist/
build/
.next/
out/

# OS-specific files
.DS_Store
Thumbs.db

# IDE-specific files
.vscode/
.idea/
*.iml

# Coverage reports
coverage/

# Temporary files
*.tmp
*.swp
*.swo
*.bak

# vercel
.vercel
# Git-specific files
.git/
.gitignore

# typescript
*.tsbuildinfo
next-env.d.ts
# Capacitor files
android/
ios/
43 changes: 43 additions & 0 deletions Docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: '3.8'

services:
iris:
build:
context: .
ports:
- "3000:3000" # IRIS frontend on localhost:3000
depends_on:
- tiny
environment:
- NEXT_PUBLIC_RERUM_GATEWAY=http://tiny:4000

rerum:
build:
context: ./rerum_server_nodejs
ports:
- "3002:3002" # Host 3002 → Container 3002 (- "HOST_PORT:CONTAINER_PORT")

depends_on:
- mongo
environment:
- MONGO_URI=mongodb://mongo:27017/rerum

tiny:
build:
context: ./TinyNode
ports:
- "4000:4000"
env_file:
- ./TinyNode/.env
depends_on:
- rerum

mongo:
image: mongo:5.0
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db

volumes:
mongo_data:
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
# ---- Stage 1: Build the application ----
FROM node:20-alpine AS builder

# Create app directory
WORKDIR /app

# Copy only package.json and yarn.lock to install dependencies
# Install dependencies only (layer caching benefit)
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# Copy the rest of the project
# Copy only needed files, thanks to .dockerignore
COPY . .

# Build the Next.js application
# Build the Next.js app
RUN yarn build

# ---- Stage 2: Production image ----
FROM node:20-alpine AS runner

WORKDIR /app

# Copy the build artifacts from the builder
# Only copy essential runtime files
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/yarn.lock ./yarn.lock

# Install only production dependencies
RUN yarn install --production

EXPOSE 3000

# Start the Next.js server
# Run the Next.js app
CMD ["yarn", "start"]
1 change: 1 addition & 0 deletions TinyNode
Submodule TinyNode added at 3daf73
Loading