Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular to Docker #314

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
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
21 changes: 21 additions & 0 deletions angular/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Use the official Node.js image as the base image
FROM node:22

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json (if available)
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the Angular application code
COPY . .

# Expose the port that Angular will serve on
EXPOSE 4200

# Run the Angular development server (ng serve)
CMD ["ng", "serve", "--host", "0.0.0.0", "--port", "4200"]

22 changes: 16 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,22 @@ services:
- "5003:5000"
volumes:
- ./flask:/app
websockets:

angular:
build:
context: ./websockets
dockerfile: Dockerfile.websockets
context: ./angular
dockerfile: Dockerfile
ports:
- "5004:5000"
- "4200:4200"
volumes:
- ./websockets:/app_websockets
- ./angular:/app
command: ["ng", "serve", "--host", "0.0.0.0", "--port", "4200"]

#websockets:
#build:
#context: ./websockets
#dockerfile: Dockerfile.websockets
#ports:
#- "5004:5000"
#volumes:
#- ./websockets:/app_websockets
2 changes: 1 addition & 1 deletion flask/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10-slim-buster
FROM python:3.12-slim-bookworm
WORKDIR /app
COPY ./requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
Expand Down
Loading