mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 11:14:28 +00:00
No data volumes for tests instances in Docker
This commit is contained in:
parent
d3f6397999
commit
95f6b5e214
2 changed files with 36 additions and 4 deletions
|
@ -17,8 +17,8 @@ script:
|
||||||
- cp -r tests/fixtures/me.yml config/me.yml
|
- cp -r tests/fixtures/me.yml config/me.yml
|
||||||
- docker-compose up -d
|
- docker-compose up -d
|
||||||
- docker-compose ps
|
- docker-compose ps
|
||||||
- WEB_PORT=5006 DATA_DIR=tests/fixtures/instance1/data CONFIG_DIR=tests/fixtures/instance1/config docker-compose -p instance1 up -d
|
- WEB_PORT=5006 CONFIG_DIR=./tests/fixtures/instance1/config docker-compose -p instance1 -f docker-compose-tests.yml up -d
|
||||||
- docker-compose -p instance1 ps
|
- docker-compose -p instance1 -f docker-compose-tests.yml ps
|
||||||
- WEB_PORT=5007 DATA_DIR=tests/fixtures/instance2/data CONFIG_DIR=tests/fixtures/instance2/config docker-compose -p instance2 up -d
|
- WEB_PORT=5007 CONFIG_DIR=./tests/fixtures/instance2/config docker-compose -p instance2 -f docker-compose-tests.yml up -d
|
||||||
- docker-compose -p instance2 ps
|
- docker-compose -p instance2 -f docker-compose-tests.yml ps
|
||||||
- pytest -v --ignore data
|
- pytest -v --ignore data
|
||||||
|
|
32
docker-compose-tests.yml
Normal file
32
docker-compose-tests.yml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "${WEB_PORT}:5005"
|
||||||
|
links:
|
||||||
|
- mongo
|
||||||
|
- rmq
|
||||||
|
volumes:
|
||||||
|
- "${CONFIG_DIR}:/app/config"
|
||||||
|
- "./static:/app/static"
|
||||||
|
environment:
|
||||||
|
- MICROBLOGPUB_AMQP_BROKER=pyamqp://guest@rmq//
|
||||||
|
- MICROBLOGPUB_MONGODB_HOST=mongo:27017
|
||||||
|
celery:
|
||||||
|
build: .
|
||||||
|
links:
|
||||||
|
- mongo
|
||||||
|
- rmq
|
||||||
|
command: 'celery worker -l info -A tasks'
|
||||||
|
environment:
|
||||||
|
- MICROBLOGPUB_AMQP_BROKER=pyamqp://guest@rmq//
|
||||||
|
- MICROBLOGPUB_MONGODB_HOST=mongo:27017
|
||||||
|
mongo:
|
||||||
|
image: "mongo:latest"
|
||||||
|
rmq:
|
||||||
|
image: "rabbitmq:latest"
|
||||||
|
hostname: "my-rabbit"
|
||||||
|
environment:
|
||||||
|
- RABBITMQ_ERLANG_COOKIE=secretrabbit
|
||||||
|
- RABBITMQ_NODENAME=rabbit@my-rabbit
|
Loading…
Reference in a new issue