-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose-firebase-test.yml
82 lines (82 loc) · 1.91 KB
/
docker-compose-firebase-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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: "3.5"
services:
testapi:
build:
context: ./api
dockerfile: ../api-test.dockerfile
command:
- uvicorn
- app.main:app
- --host
- 0.0.0.0
- --port
- "80"
- --root-path
- /api
depends_on:
testdb:
condition: service_healthy
testfirebase:
condition: service_healthy
environment:
WEBUI_URL: ${WEBUI_URL}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_HOST: testdb
DB_PORT: 5432
DB_SCHEMA: postgres
SYSTEM_EMAIL: [email protected]
SENDGRID_API_KEY: fake_api_key_for_sendgrid_test
AUTH_SERVICE: FIREBASE
FIREBASE_API_KEY: ${FIREBASE_API_KEY}
FIREBASE_CRED: /key/firebase_credentials.json
FIREBASE_AUTH_EMULATOR_HOST: testfirebase:9099
networks:
- test-network
volumes:
- ./api/app:/app:ro
- ./api/app/alembic:/app/alembic:rw # for 'alembic revision --autogenerate'
- ./key:/key:ro
testdb:
image: postgres:14
command:
- postgres
# - -c
# - log_connections=on
- -c
- log_destination=stderr
# - -c
# - log_disconnections=on
- -c
- log_statement=all
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${DB_USER}
interval: 10s
timeout: 5s
retries: 2
networks:
- test-network
testfirebase:
build: ./firebase
ports:
- 4000:4000 # Emulator Suite UI
- 9099:9099 # Auth
volumes:
- ./firebase:/opt/workspace
working_dir: /opt/workspace
command: "firebase emulators:start --import=./data-test"
tty: true
healthcheck:
test: curl --fail http://localhost:9099 || exit 1
interval: 10s
timeout: 5s
retries: 6
networks:
- test-network
networks:
test-network: