-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2f5863
commit 9e88651
Showing
7 changed files
with
55 additions
and
16 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 |
---|---|---|
@@ -1,7 +1,13 @@ | ||
# consumer | ||
COMPOSE_FILE=docker-compose.yaml:docker-compose/local.yaml | ||
COMPOSE_PROFILES=pact | ||
# CYPRESS_BASE_URL=https://proxy:8443 | ||
# INTERNAL_BACKEND_URL=http://provider:8000 | ||
# NEXT_PUBLIC_PROJECT_URL=https://localhost:8443 | ||
# REACT_ENVIRONMENT=development | ||
# SERVICE_DOCKER_FILE=docker/local.Dockerfile | ||
# cypress | ||
# CYPRESS_BASE_URL=https://proxy:8443 | ||
# user | ||
# GROUP_ID=1000 | ||
# USER_ID=1000 | ||
# USER=appuser |
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
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
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,21 @@ | ||
version: "3.9" | ||
|
||
services: | ||
|
||
consumer: | ||
build: | ||
args: | ||
USER: ${USER:-nextjs} | ||
context: ./ | ||
dockerfile: ${SERVICE_DOCKER_FILE:-docker/test.Dockerfile} | ||
volumes: | ||
- ./__tests__:/app/__tests__:ro | ||
- ./components:/app/components:ro | ||
- ./declarations:/app/declarations:ro | ||
- ./models:/app/models:ro | ||
- ./pages:/app/pages:ro | ||
- ./public:/app/public:ro | ||
- ./store:/app/store:ro | ||
- ./styles:/app/styles:ro | ||
- ./utils:/app/utils:ro | ||
user: ${USER:-nextjs} |
File renamed without changes.
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
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 |
---|---|---|
@@ -1,17 +1,20 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM node:16-bullseye-slim | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 NEXT_TELEMETRY_DISABLED=1 NODE_ENV="development" TZ='Europe/Rome' WORKDIR=/app | ||
ARG DEBIAN_FRONTEND=noninteractive USER=appuser | ||
ENV APPUSER=$USER LANG=C.UTF-8 LC_ALL=C.UTF-8 NEXT_TELEMETRY_DISABLED=1 NODE_ENV="development" PATH="$PATH:./node_modules/.bin" TZ='Europe/Rome' WORKDIR=/app | ||
RUN apt-get update \ | ||
&& apt-get install --assume-yes --no-install-recommends \ | ||
g++ \ | ||
make \ | ||
python3 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
&& rm -rf /var/lib/apt/lists/* | ||
WORKDIR $WORKDIR | ||
ENV PATH="$PATH:./node_modules/.bin" | ||
COPY package.json yarn.lock ./ | ||
ENTRYPOINT ["./scripts/test.sh"] | ||
CMD yarn ci:unit-test && yarn ci:contract-test | ||
RUN addgroup --system --gid 1001 $APPUSER | ||
RUN adduser --system --uid 1001 $APPUSER | ||
RUN chown $APPUSER:$APPUSER $WORKDIR | ||
USER $APPUSER | ||
COPY --chown=$APPUSER ./scripts/test.sh jest.config.js middleware.ts next.config.js package.json tsconfig.json yarn.lock ./ | ||
ENTRYPOINT ["./test.sh"] | ||
CMD yarn ci:contract-test && yarn ci:unit-test | ||
LABEL company="20tab" project="{{ cookiecutter.project_slug }}" service="frontend" stage="test" |