docker-compose-ci.yml update

docker-compose-ci.yml update
This commit is contained in:
SamR1 2018-01-13 11:05:23 +01:00
parent 132ce37d5d
commit e3b406c627
2 changed files with 13 additions and 10 deletions

View File

@ -14,13 +14,15 @@ before_install:
- sudo mv docker-compose /usr/local/bin - sudo mv docker-compose /usr/local/bin
before_script: before_script:
- export APP_SETTINGS="project.config.TestingConfig" - export DATABASE_TEST_URL=postgres://postgres:@localhost:5432/mpwo_test
- export DATABASE_TEST_URL=postgresql://postgres:@localhost/users_test - export APP_SETTINGS=mpwo_api.config.TestingConfig
- export REACT_APP_USERS_SERVICE_URL=http://127.0.0.1:3000/api/ - export REACT_APP_USERS_SERVICE_URL=http://localhost:3000/api/
- docker-compose -f docker-compose-ci.yml up --build -d - docker-compose -f docker-compose-ci.yml up --build -d
script: script:
- psql -c 'create database mpwo_test;' -U postgres - psql -c 'create database mpwo_test;' -U postgres
- echo $DATABASE_TEST_URL
- psql -c '\list' -U postgres
- docker-compose -f docker-compose-ci.yml run api flask init_db - docker-compose -f docker-compose-ci.yml run api flask init_db
after_script: after_script:

View File

@ -2,14 +2,14 @@ version: '3.3'
services: services:
db: api-db:
container_name: db container_name: api-db
build: https://github.com/SamR1/mpwo.git#master:mpwo_api/db build: https://github.com/SamR1/mpwo.git#master:mpwo_api/db
ports: ports:
- 5435:5432 - 5435:5432
environment: environment:
- POSTGRES_USER=mpwo - POSTGRES_USER=postgres
- POSTGRES_PASSWORD=mpwo - POSTGRES_PASSWORD=postgres
api: api:
container_name: api container_name: api
@ -19,14 +19,15 @@ services:
ports: ports:
- 5001:5000 - 5001:5000
environment: environment:
- DATABASE_URL=postgres://postgres:postgres@api-db:5432/mpwo
- DATABASE_TEST_URL=postgres://postgres:postgres@api-db:5432/mpwo_test
- FLASK_APP=server.py - FLASK_APP=server.py
- FLASK_DEBUG=1 - FLASK_DEBUG=1
- APP_SETTINGS=mpwo_api.config.TestingConfig - APP_SETTINGS=mpwo_api.config.TestingConfig
- DATABASE_URL=postgres://mpwo:mpwo@db:5432/mpwo_test
depends_on: depends_on:
- db - api-db
links: links:
- db - api-db
client: client:
container_name: client container_name: client