Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoLC committed May 16, 2024
1 parent d221ebe commit 4b43a4c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ bootstrap: \
back-i18n-compile \
mails-install \
mails-build \
install-front-impress
run-frontend-dev
.PHONY: bootstrap

# -- Docker/compose
Expand Down Expand Up @@ -301,6 +301,9 @@ help:
.PHONY: help

# Front
run-frontend-dev: ## Install and run the frontend dev
@$(COMPOSE) up --force-recreate -d frontend-dev

install-front-impress: ## Install the frontend dependencies of app Impress
cd $(PATH_FRONT_IMPRESS) && yarn
.PHONY: install-front-impress
Expand Down
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: '3.8'

volumes:
frontend-node-modules:

services:
postgresql:
image: postgres:16
Expand Down Expand Up @@ -39,6 +42,7 @@ services:
/usr/bin/mc alias set impress http://minio:9000 impress password && \
/usr/bin/mc mb impress/impress-media-storage && \
/usr/bin/mc version enable impress/impress-media-storage && \
/usr/bin/mc ilm rule add --noncurrent-expire-days 364 myminio/impress-media-storage
exit 0;"
app-dev:
Expand Down Expand Up @@ -142,6 +146,7 @@ services:
- ".:/app"

y-webrtc-signaling:
user: "${DOCKER_USER:-1000}"
build:
context: .
dockerfile: ./src/frontend/Dockerfile
Expand All @@ -154,6 +159,22 @@ services:
- /home/frontend/apps/y-webrtc-signaling/node_modules/
- /home/frontend/apps/y-webrtc-signaling/dist/

frontend-dev:
user: "${DOCKER_USER:-1000}"
args:
DOCKER_USER: ${DOCKER_USER:-1000}
build:
context: .
dockerfile: ./src/frontend/Dockerfile
target: frontend-dev
ports:
- "30000:3000"
volumes:
- ./src/frontend/:/home/frontend/
- frontend-node-modules:/home/frontend/apps/node_modules/
depends_on:
- y-webrtc-signaling
- app-dev

kc_postgresql:
image: postgres:14.3
Expand Down
28 changes: 28 additions & 0 deletions src/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
FROM node:20 as frontend-dev

WORKDIR /home/frontend/

COPY ./src/frontend/package.json ./package.json
COPY ./src/frontend/yarn.lock ./yarn.lock
COPY ./src/frontend/apps/impress/package.json ./apps/impress/package.json
COPY ./src/frontend/apps/e2e/package.json ./apps/e2e/package.json
COPY ./src/frontend/packages/eslint-config-impress/package.json ./packages/eslint-config-impress/package.json

RUN yarn install --frozen-lockfile

COPY ./src/frontend/ .

WORKDIR /home/frontend/apps/e2e/

RUN yarn install

WORKDIR /home/frontend/apps/impress/

# Un-privileged user running the application
ARG DOCKER_USER
USER ${DOCKER_USER}

ENTRYPOINT [ "/usr/local/bin/entrypoint" ]

CMD ["yarn", "dev"]

FROM node:20-alpine as frontend-deps-y-webrtc-signaling

WORKDIR /home/frontend/
Expand Down

0 comments on commit 4b43a4c

Please sign in to comment.