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
7 changes: 7 additions & 0 deletions docker/app1-hello/node/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
npm-debug.log
.git
.gitignore
README.md
.env
.DS_Store
13 changes: 13 additions & 0 deletions docker/app1-hello/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:24-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install --production

COPY . .

EXPOSE 3000

CMD ["node", "app.js"]
7 changes: 7 additions & 0 deletions docker/app1-hello/python/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.11.15-alpine3.22
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 3000
CMD [ "python", "main.py" ]
62 changes: 62 additions & 0 deletions docker/app2-tax-calculator/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# services:
# service-a:
# build: ./node/service-a
# ports:
# - "3100:3000"
# depends_on:
# - service-b
# environment:
# - TAX_SERVICE_URL=http://service-b:4000

# service-b:
# build: ./node/service-b
# ports:
# - "3200:4000"

# services:
# service-a:
# build: ./spring/service-a
# ports:
# - "3100:3000"
# depends_on:
# - service-b
# environment:
# - TAX_SERVICE_URL=http://service-b:4000

# service-b:
# build: ./spring/service-b
# ports:
# - "3200:4000"

services:
service-a:
build: ./python/service-a
ports:
- "3100:3000"
depends_on:
- service-b
environment:
- TAX_SERVICE_URL=http://service-b:4000
- FRONTEND_URL=http://localhost:5173
networks:
- tax-network

service-b:
build: ./python/service-b
ports:
- "3200:4000"
networks:
- tax-network

frontend:
build: ./tax-calculator-frontend
ports:
- "5173:80"
depends_on:
- service-a
networks:
- tax-network

networks:
tax-network:
driver: bridge
7 changes: 7 additions & 0 deletions docker/app2-tax-calculator/node/service-a/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
npm-debug.log
.git
.gitignore
README.md
.env
.DS_Store
13 changes: 13 additions & 0 deletions docker/app2-tax-calculator/node/service-a/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:24-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install --production

COPY . .

EXPOSE 3000

CMD ["node", "index.js"]
7 changes: 7 additions & 0 deletions docker/app2-tax-calculator/node/service-b/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
npm-debug.log
.git
.gitignore
README.md
.env
.DS_Store
13 changes: 13 additions & 0 deletions docker/app2-tax-calculator/node/service-b/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:24-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install --production

COPY . .

EXPOSE 4000

CMD ["node", "index.js"]
7 changes: 7 additions & 0 deletions docker/app2-tax-calculator/python/service-a/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.11.15-alpine3.22
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 3000
CMD [ "python", "main.py" ]
7 changes: 7 additions & 0 deletions docker/app2-tax-calculator/python/service-b/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.11.15-alpine3.22
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 4000
CMD [ "python", "main.py" ]
5 changes: 5 additions & 0 deletions docker/app2-tax-calculator/spring/service-a/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM eclipse-temurin:21-jdk
WORKDIR /app
COPY target/*.jar app.jar
EXPOSE 3000
CMD [ "java", "-jar", "app.jar", "--server.port=3000" ]
5 changes: 5 additions & 0 deletions docker/app2-tax-calculator/spring/service-b/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM eclipse-temurin:21-jdk
WORKDIR /app
COPY target/*.jar app.jar
EXPOSE 4000
CMD [ "java", "-jar", "app.jar", "--server.port=4000" ]
11 changes: 11 additions & 0 deletions docker/app2-tax-calculator/tax-calculator-frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:24-slim AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80