Skip to content

Commit

Permalink
Merge pull request #1082 from UniversityOfHelsinkiCS/trunk
Browse files Browse the repository at this point in the history
Use extend in travis docker-compose files
  • Loading branch information
esakemp authored Jul 8, 2019
2 parents c5cc7bd + 68df47a commit b1ea23a
Show file tree
Hide file tree
Showing 13 changed files with 349 additions and 677 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- IMAGE=STAGING
script:
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- source scripts.sh && time run_e2e_setup docker-compose.lateste2e.yml
- source scripts.sh && time run_e2e_setup ./docker/docker-compose.lateste2e.yml
- docker ps
- cat nginx/log
- docker-compose logs -f &
- docker-compose -f docker-compose.yml -f ./docker/docker-compose.lateste2e.yml logs -f &
- until $(curl --output /dev/null --silent --fail http://localhost:1337/); do printf '.'; sleep 5; done
- time npm run test_services
- time CYPRESS_baseUrl=http://localhost:1337/ npm run cypress:record
Expand All @@ -38,7 +38,7 @@ jobs:
deploy: # deploy is always skipped for PR
provider: script
skip_cleanup: true
script: "docker-compose -f docker-compose.lateste2e.yml push && curl -X POST -H 'Content-type: application/json' --data \"{\\\"text\\\":\\\"Staging auto deployment started!\\\"}\" ${SLACKBOT_URL}"
script: "docker-compose -f docker-compose.yml -f ./docker/docker-compose.lateste2e.yml push && curl -X POST -H 'Content-type: application/json' --data \"{\\\"text\\\":\\\"Staging auto deployment started!\\\"}\" ${SLACKBOT_URL}"
on:
branch: master
- # in parallel
Expand All @@ -47,10 +47,10 @@ jobs:
- IMAGE=PRODUCTION
script:
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- source scripts.sh && time run_e2e_setup docker-compose.lateste2e.production.yml
- source scripts.sh && time run_e2e_setup ./docker/docker-compose.lateste2e.production.yml
- docker ps
- cat nginx/log
- docker-compose logs -f &
- docker-compose -f docker-compose.yml -f ./docker/ocker-compose.lateste2e.production.yml logs -f &
- until $(curl --output /dev/null --silent --fail http://localhost:1337/); do printf '.'; sleep 5; done
- time npm run test_services
- time CYPRESS_baseUrl=http://localhost:1337/ npm run cypress:record
Expand All @@ -59,7 +59,7 @@ jobs:
deploy: # deploy is always skipped for PR
provider: script
skip_cleanup: true
script: "docker-compose -f docker-compose.lateste2e.production.yml push && curl -X POST -H 'Content-type: application/json' --data \"{\\\"text\\\":\\\"${TRAVIS_TAG} release started auto deployment!\\\"}\" ${SLACKBOT_URL}"
script: "docker-compose -f docker-compose.yml -f ./docker/docker-compose.lateste2e.production.yml push && curl -X POST -H 'Content-type: application/json' --data \"{\\\"text\\\":\\\"${TRAVIS_TAG} release started auto deployment!\\\"}\" ${SLACKBOT_URL}"
on:
tags: true

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,27 @@ The mapping of ports and environment variables are also defined in the docker-co
#### With anonymized data:

```
docker-compose up -d
npm run docker:up
```

#### With real data:

```
docker-compose -f docker-compose.yml -f docker-compose.real.yml up -d
docker-compose -f docker-compose.yml -f ./docker/docker-compose.dev.yml -f ./docker/docker-compose.dev.real.yml up -d
```

### Stop the development environment

```
docker-compose down
npm run docker:down
```

### Restart container(s)

```
docker-compose restart # all
npm run docker:restart # all
docker-compose restart backend # just backend
npm run docker:restart:backend # just backend
```

### View the containers in the running environment
Expand All @@ -90,9 +90,9 @@ docker-compose ps


```
docker-compose logs -f # all
npm run docker:logs # all
docker-compose logs -f backend # just backend
npm run docker:logs:backend # just backend
```


Expand Down
249 changes: 0 additions & 249 deletions docker-compose.lateste2e.production.yml

This file was deleted.

Loading

0 comments on commit b1ea23a

Please sign in to comment.