-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
39 lines (36 loc) · 950 Bytes
/
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
version: '3.8'
services:
# API service
web:
build: ./src
command: bash -c "alembic upgrade head && uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8000"
volumes:
- ./src:/usr/src/app
ports:
- 8004:8000
environment:
- ENVIRONMENT=dev
- TESTING=0
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@web-db:5432/datahandler_dev
- DATABASE_TEST_URL=postgresql+asyncpg://postgres:postgres@web-db:5432/datahandler_test
depends_on:
- web-db
# Database service
web-db:
build:
context: ./src/db
dockerfile: Dockerfile
expose:
- 5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
# pgAdmin service
pgadmin:
container_name: pgadmin4
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: root
ports:
- "5050:80"