-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
67 lines (60 loc) · 1.48 KB
/
docker-compose.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
version: "3"
services:
db:
image: postgres:11.17-bullseye
container_name: pg.metrics.rciam.11
user: root
privileged: true
volumes:
- ./pg-init-scripts:/docker-entrypoint-initdb.d
- ./pgdata:/var/lib/postgresql/data:rw
environment:
- POSTGRES_MULTIPLE_DATABASES=metrics_dev,metrics_test
- POSTGRES_USER=rciam
- POSTGRES_PASSWORD=secret
- PGDATA=/var/lib/postgresql/data/pgdata
ports:
- "65432:5432"
tty: true # this is used to prevent container from exiting if the entrypoint is /bin/bash
stdin_open: true
web:
depends_on:
- db
build: .
image: metricsrciam:latest
container_name: metrcis.rciam.fastapi
environment:
- DATABASE_URL=postgresql+psycopg2://rciam:secret@db/metrics_dev
- API_ENVIRONMENT=dev
command: uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8000
ports:
- "8004:8000"
- "3004:3000"
volumes:
- .:/app
tty: true
api:
depends_on:
- db
- web
image: metricsrciam:latest
container_name: metrics.rciam.reactjs
command: bash -c "npm start"
ports:
- "3300:3000"
volumes:
- ./javascript:/app
# - ./javascript/node_modules
tty: true
locust:
image: metricsrciam:latest
container_name: metrics.rciam.locust
command: locust -f app/tests/locust.py
ports:
- "8089:8089"
- "3100:3100"
volumes:
- .:/app
tty: true
volumes:
pgdata: