-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/LN-1366-setup-development-environment-and-make-…
…file' into 'dev' Feature/ln 1366 setup development environment and make file See merge request voltaire/govtool-outcomes-pillar!3
- Loading branch information
Showing
13 changed files
with
2,761 additions
and
9,475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/govtool/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
Oops, something went wrong.