-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
59 lines (57 loc) · 1.67 KB
/
compose.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
services:
api:
build:
no_cache: true
context: .
dockerfile: Dockerfile.local
environment:
- PG_USER=${PG_USER}
- PG_HOST=${PG_HOST}
- PG_DB=${PG_DB}
- PG_PASS=${PG_PASS}
- PG_PORT=${PG_PORT}
- PG_DB_TEST=${PG_DB_TEST}
- PG_USER_TEST=${PG_USER_TEST}
- PG_PASS_TEST=${PG_PASS_TEST}
- PG_HOST_TEST=${PG_HOST_TEST}
- PG_PORT_TEST=${PG_PORT_TEST}
- ENV=${ENV}
- POOL_MIN_SIZE=${POOL_MIN_SIZE}
- POOL_MAX_SIZE=${POOL_MAX_SIZE}
- API_VERSION=${API_VERSION}
- DEBUG=${DEBUG}
- POOL_ID=${POOL_ID}
- CLIENT_ID=${CLIENT_ID}
- CLIENT_SECRET=${CLIENT_SECRET}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_REGION=${AWS_REGION}
ports:
- "8000:8000"
depends_on:
- postgres # Ensure Postgres starts before the API service
- pg_admin
volumes:
- ./src:/app/src:cached # Mount the source code for live reloading during development
- ./tests:/app/tests:cached
- ./src/python/api:/app:cached
- ./src/python/lambda_utils:/app/lambda_utils:cached
postgres:
image: postgres
restart: always
environment:
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PASS}
POSTGRES_DB: ${PG_DB} # Added to create the main DB on startup
volumes:
- ./src/postgres:/docker-entrypoint-initdb.d/
ports:
- "5432:5432"
pg_admin:
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
ports:
- "8001:80"