Skip to content

Commit

Permalink
Merge branch 'feature/LN-1366-setup-development-environment-and-make-…
Browse files Browse the repository at this point in the history
…file' into 'dev'

Feature/ln 1366 setup development environment and make file

See merge request voltaire/govtool-outcomes-pillar!3
  • Loading branch information
Emmanuel-Tyty committed Dec 30, 2024
2 parents a6099c2 + 522a05e commit d5e0267
Show file tree
Hide file tree
Showing 13 changed files with 2,761 additions and 9,475 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/govtool/
17 changes: 17 additions & 0 deletions Dockerfile.govtool
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:20-alpine as base

RUN apk add --no-cache git bash

WORKDIR /app
RUN git clone https://github.com/IntersectMBO/govtool.git /app


WORKDIR /app/govtool/frontend
# RUN yarn install

COPY start-govtool.sh /usr/local/bin/start-govtool.sh
RUN chmod +x /usr/local/bin/start-govtool.sh

EXPOSE 5173

ENTRYPOINT ["/usr/local/bin/start-govtool.sh"]
66 changes: 66 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
.PHONY: init
init:
make ui-install
make backend-install
docker compose up -d
make govtool-install

.PHONY: up
up:
docker compose up -d
make govtool-install

.PHONY: down
down:
docker compose down

.PHONY: ui-install
ui-install:
make ui-clean
docker run --rm --interactive --tty \
--volume ${PWD}/ui/:/app \
--workdir /app \
--user root \
node:20-alpine yarn install --ignore-engine

.PHONY: backend-install
backend-install:
make backend-clean
docker run --rm --interactive --tty \
--volume ${PWD}/backend/:/app \
--workdir /app \
--user root \
node:20-alpine yarn install --ignore-engine

.PHONY: govtool-install
govtool-install:
docker run --rm --interactive --tty \
--volume ${PWD}/govtool/frontend/:/app \
--workdir /app \
--user root \
node:20-alpine yarn install --ignore-engine

.PHONY: backend-clean
backend-clean:
rm -rf backend/node_modules 2>/dev/null || true


.PHONY: ui-clean
ui-clean:
rm -rf ui/node_modules 2>/dev/null || true


.PHONY: image-build-ui
image-build-ui:
docker build \
-f ui/Dockerfile.dev \
-t outcomes-pillar-ui \
ui/.


.PHONY: image-build-backend
image-build-backend:
docker build \
-f backend/Dockerfile.dev \
-t outcomes-pillar-backend \
backend/.
14 changes: 14 additions & 0 deletions backend/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:18-alpine

WORKDIR /usr/src/app

COPY package.json ./
COPY yarn.lock ./

RUN npm install -g @nestjs/cli && yarn install --frozen-lockfile

COPY . .

EXPOSE 3000

CMD [ "npx", "nest", "start", "--watch" ]
Loading

0 comments on commit d5e0267

Please sign in to comment.