customer/deployments/test/docker-compose.yaml

61 lines
1.3 KiB
YAML
Raw Normal View History

2023-05-16 01:12:07 +00:00
version: "3"
services:
app:
build:
context: ../../.
dockerfile: Dockerfile
target: test
env_file:
- ../../.env.test
environment:
- AUTH_MICROSERVICE_EXHANGE_URL=http://mock:8080/exchange
- AUTH_MICROSERVICE_REGISTER_URL=http://mock:8080/register
- AUTH_MICROSERVICE_USER_URL=http://mock:8080/user
- AMOCRM_USER_INFO_URL=http://mock:8080/api/v4/account
- AMOCRM_ACCESS_TOKEN_URL=http://mock:8080/oauth2/access_token
- MONGO_HOST=mongo
ports:
- 8080:8080
depends_on:
- migration
networks:
- integration_test
migration:
build:
context: ../../.
dockerfile: Dockerfile
target: migration
command:
[
"sh",
"-c",
'migrate -source file://migrations -database "mongodb://$MONGO_USER:$MONGO_PASSWORD@$MONGO_HOST:$MONGO_PORT/$MONGO_AUTH?authSource=$MONGO_AUTH" up',
]
depends_on:
- mongo
networks:
- integration_test
mongo:
image: 'mongo:6.0.3'
environment:
MONGO_INITDB_ROOT_USERNAME: test
MONGO_INITDB_ROOT_PASSWORD: test
ports:
- '27017:27017'
networks:
- integration_test
mock:
image: 'wiremock/wiremock:2.35.0'
ports:
- 8000:8080
networks:
- integration_test
depends_on:
- app
networks:
integration_test: