-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.test.yml
44 lines (43 loc) · 1.31 KB
/
docker-compose.test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: "3"
services:
app:
build:
context: .
dockerfile: app/docker/Dockerfile
environment:
APP_DOMAIN: "app"
DB_URL: postgresql+psycopg2://postgres:postgres@db-test:5432/mailgoose
FORWARDED_ALLOW_IPS: "*"
LANGUAGE: en_US
REDIS_MESSAGE_DATA_EXPIRY_SECONDS: 864000
REDIS_URL: redis://redis-test:6379/0
command: bash -c "/wait-for-it.sh db-test:5432 -- uvicorn src.app:app --host 0.0.0.0 --port 8000 --proxy-headers"
worker:
build:
context: .
dockerfile: app/docker/Dockerfile
environment:
APP_DOMAIN: "app"
DB_URL: postgresql+psycopg2://postgres:postgres@db-test:5432/mailgoose
LANGUAGE: en_US
REDIS_MESSAGE_DATA_EXPIRY_SECONDS: 864000
REDIS_URL: redis://redis-test:6379/0
command: bash -c "/wait-for-it.sh db:5432 -- rq worker"
db-test:
image: postgres:15.2-alpine
environment:
- POSTGRES_DB=mailgoose
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
redis-test:
image: redis
bind9:
build:
context: .
dockerfile: docker-bind9/Dockerfile
test:
profiles: ["test"] # This will prevent the service from starting by default
build:
context: .
dockerfile: test/Dockerfile
command: bash -c "/wait-for-it.sh app:8000 -- python -m unittest discover"