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
before_script:
- export APP_SETTINGS="project.config.TestingConfig"
- export DATABASE_TEST_URL=postgresql://postgres:@localhost/users_test
- export REACT_APP_USERS_SERVICE_URL=http://127.0.0.1:3000/api/
- export DATABASE_TEST_URL=postgres://postgres:@localhost:5432/mpwo_test
- export APP_SETTINGS=mpwo_api.config.TestingConfig
- export REACT_APP_USERS_SERVICE_URL=http://localhost:3000/api/
- docker-compose -f docker-compose-ci.yml up --build -d
script:
- 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
after_script:

View File

@ -2,14 +2,14 @@ version: '3.3'
services:
db:
container_name: db
api-db:
container_name: api-db
build: https://github.com/SamR1/mpwo.git#master:mpwo_api/db
ports:
- 5435:5432
environment:
- POSTGRES_USER=mpwo
- POSTGRES_PASSWORD=mpwo
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
api:
container_name: api
@ -19,14 +19,15 @@ services:
ports:
- 5001:5000
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_DEBUG=1
- APP_SETTINGS=mpwo_api.config.TestingConfig
- DATABASE_URL=postgres://mpwo:mpwo@db:5432/mpwo_test
depends_on:
- db
- api-db
links:
- db
- api-db
client:
container_name: client