Skip to content
Snippets Groups Projects
Commit 9954dc46 authored by s80984's avatar s80984
Browse files

Update docker-compose host

parent b1bda395
No related branches found
No related tags found
No related merge requests found
Pipeline #14126 failed
...@@ -34,7 +34,8 @@ job_build-image: ...@@ -34,7 +34,8 @@ job_build-image:
- docker info - docker info
- docker-compose --version - docker-compose --version
script: script:
- docker-compose up #--tag "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}" ps - docker-compose up -d --build
# - docker-compose up #--tag "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}" ps
# - docker-compose build # - docker-compose build
# --file "server/Containerfile" # --file "server/Containerfile"
# --tag "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}" # --tag "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}"
...@@ -79,7 +80,8 @@ job_test-image: ...@@ -79,7 +80,8 @@ job_test-image:
|| (echo 'Test failed' && exit 1) || (echo 'Test failed' && exit 1)
after_script: after_script:
# NOTE: clean up after test run (stop and remove container) # NOTE: clean up after test run (stop and remove container)
- docker rm --force "${CI_PROJECT_ID}-${CI_PIPELINE_IID}" # - docker rm --force "${CI_PROJECT_ID}-${CI_PIPELINE_IID}"
- docker-compose down
job_deploy-new-version: job_deploy-new-version:
......
...@@ -5,19 +5,20 @@ services: ...@@ -5,19 +5,20 @@ services:
image: mongo image: mongo
ports: ports:
- '27017:27017' - '27017:27017'
volumes:
- mongodb:/.local/db/data/db
app: app:
container_name: docker-node-mongo container_name: docker-node-mongo
restart: always restart: always
build: ./app/server build: ./app/server
ports: ports:
- '80:3000' - '80:3000'
# links: links:
# - mongo - mongo
environment: environment:
- PORT=3000 - PORT=3000
- MONGODB_URL=mongodb://localhost:27017/todo-app - MONGODB_URL=mongodb://mongo:27017/todo-app
- JWT_SECRET=myjwtsecret - JWT_SECRET=myjwtsecret
# - MONGO_URL=mongodb://localhost:27017/todo-app 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