Skip to content

Commit

Permalink
Docker & Docker-Compose
Browse files Browse the repository at this point in the history
  • Loading branch information
mskKandula committed Oct 3, 2023
1 parent 5bd93e2 commit 332b83d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
19 changes: 17 additions & 2 deletions WebSockets/V3/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,31 @@ services:
build:
context: .
dockerfile: ./server/Dockerfile
expose: ["8000"]
expose: ["9000"]
ports:
- "8000:8000"
- "9000:9000"

networks:
- default
# We mount the working dir into the container, handy for development
# This is what makes the hot reloading work inside of a Docker container
restart: always

ngin:
container_name: "conn_nginx"
# we want to use the image which is build from our Dockerfile
build:
context: .
dockerfile: ./nginx/Dockerfile
expose: ["8020"]
ports:
- "8020:8020"
networks:
- default
# We mount the working dir into the container, handy for development
# This is what makes the hot reloading work inside of a Docker container
restart: always

client:
# container_name: "conn_client"
# privileged: true
Expand Down
10 changes: 10 additions & 0 deletions WebSockets/V3/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM nginx:stable-alpine

RUN rm /etc/nginx/nginx.conf /etc/nginx/conf.d/default.conf

# Copy configuration
COPY ./nginx/nginx.conf /etc/nginx/

EXPOSE 8020

ENTRYPOINT ["nginx", "-g", "daemon off;"]
3 changes: 3 additions & 0 deletions WebSockets/V3/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ RUN apk update && \
apk upgrade && \
apk add git

# Install gcc & other related
# RUN apk add build-base

# Set the Current Working Directory inside the container
WORKDIR /app/V3/server

Expand Down

0 comments on commit 332b83d

Please sign in to comment.