Skip to content
Snippets Groups Projects
Commit 260520c7 authored by s80984's avatar s80984
Browse files

Update pipeline build

parent 5c93a9ba
No related branches found
No related tags found
No related merge requests found
Pipeline #14147 failed
...@@ -71,7 +71,7 @@ job_test-image: ...@@ -71,7 +71,7 @@ job_test-image:
before_script: before_script:
- apk add --no-cache docker-compose - apk add --no-cache docker-compose
script: script:
- docker-compose -f docker-compose.test.yml up - docker-compose -f docker-compose.test.yml up
# - npm run test # - npm run test
# - docker run # - docker run
# --detach # --detach
......
# FROM node:16
# # Copy your source file directory into /app
# # WORKDIR ${HOME}
# # COPY /app
# # Change to /app
# WORKDIR /app
# # Install make
# # RUN apt update && apt install -y make
# # COPY package*.json ./
# WORKDIR /app/client
# RUN npm install
# WORKDIR /app/server
# RUN npm install
# # SERVER_PUBLIC_URL ?= http://127.0.0.1:3001
# # # run make
# # RUN make install
# # RUN make build
# # CMD ["npm", "serve", "--port 4000"]
# # RUN make run
# EXPOSE 8080
FROM node:16
# Create app directory
# WORKDIR /usr/src/app
WORKDIR /usr/src/app
# COPY ./client/package*.json ./
COPY package*.json ./
RUN npm install
# Bundle app source
COPY . .
EXPOSE 3000
CMD [ "npm", "run test" ]
version: '3'
services:
mongo:
container_name: mongo
image: mongo
ports:
- '27017:27017'
volumes:
- mongodb:/.local/db/data/db
app:
container_name: node-mongo-app
# image: ${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}
restart: always
build:
context: ./app/server
dockerfile: Dockerfile.test
ports:
- '80:3000'
links:
- mongo
environment:
- PORT=3000
- MONGODB_URL=mongodb://mongo:27017/todo-app
- JWT_SECRET=myjwtsecret
volumes:
mongodb:
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment