-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yaml
92 lines (92 loc) · 2.32 KB
/
docker-compose.dev.yaml
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
83
84
85
86
87
88
89
90
91
92
version: "3.8"
services:
setup:
image: alpine:latest
volumes:
- ./:/mnt/setup
command: >
ash -c "mkdir -p /mnt/setup/tmp && mkdir -p /mnt/setup/tmp/pgdata"
db:
container_name: db
depends_on:
setup:
condition: service_completed_successfully
build:
context: .
dockerfile: ./docker/postgres/Dockerfile
environment:
POSTGRES_PASSWORD: ${AGNOSTIC_DB_PASSWORD}
DB_NAME: ${AGNOSTIC_DB_NAME}
volumes:
- type: bind
source: ./tmp/pgdata
target: /var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: pg_isready -U postgres
interval: 5s
timeout: 5s
retries: 20
networks:
- internal
adminer:
container_name: adminer
depends_on:
db:
condition: service_healthy
image: adminer:latest
ports:
- "8080:8080"
networks:
- internal
api:
container_name: api
depends_on:
db:
condition: service_healthy
image: python:3.11.1
volumes:
- type: bind
source: ./
target: /opt/agnostic
ports:
- "8000:8000"
environment:
AGNOSTIC_DB_USERNAME: ${AGNOSTIC_DB_USERNAME}
AGNOSTIC_DB_PASSWORD: ${AGNOSTIC_DB_PASSWORD}
AGNOSTIC_DB_HOST: db
AGNOSTIC_DB_PORT: ${AGNOSTIC_DB_PORT}
AGNOSTIC_DB_NAME: ${AGNOSTIC_DB_NAME}
AGNOSTIC_PRODUCTION: False
WEB_CONCURRENCY: ${WEB_CONCURRENCY}
command: >
bash -c "cd /opt/agnostic/src && python3 -m pip install -r ../requirements.txt && python3 run.py"
networks:
- internal
ui:
container_name: ui
depends_on:
api:
condition: service_started
image: node:14
volumes:
- type: bind
source: ./
target: /opt/agnostic
ports:
- "3000:3000"
environment:
AGNOSTIC_DB_USERNAME: ${AGNOSTIC_DB_USERNAME}
AGNOSTIC_DB_PASSWORD: ${AGNOSTIC_DB_PASSWORD}
AGNOSTIC_DB_HOST: db
AGNOSTIC_DB_PORT: ${AGNOSTIC_DB_PORT}
AGNOSTIC_DB_NAME: ${AGNOSTIC_DB_NAME}
AGNOSTIC_PRODUCTION: False
VITE_API_URL: http://localhost:8000/api/v1
command: >
bash -c "cd /opt/agnostic/src/agnostic_report/ui && npm config set prefix \"$HOME/tmp/container/node_modules\" && npm install && npm run dev"
networks:
- internal
networks:
internal: