-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (54 loc) · 1.3 KB
/
docker-compose.yml
File metadata and controls
59 lines (54 loc) · 1.3 KB
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
version: '3.8'
services:
postgres:
build:
context: .
dockerfile: postgres.dockerfile
image: img-test-db
container_name: ctn-test-db
networks:
- testauth_network
env_file: .env
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGDATA: ${PGDATA}
volumes:
- vol-test-auth-db:/data/postgres-testdb
ports:
- "5433:5432"
expose:
- 5433
restart: unless-stopped
# fastAPI
test-api:
env_file: .env
# secrets: # Need to point to Secrets from vault?
environment:
- POSTGRES_SERVER=postgres # db service name
image: img-testauth-api-v1
container_name: ctn-test-api-v1
networks:
- testauth_network
command: bash -c 'while !</dev/tcp/postgres/5432; do sleep 1; done; alembic upgrade head; uvicorn app.main:app --host 0.0.0.0'
build:
context: .
dockerfile: ./Dockerfile
ports:
- 80:8000
# - 443:8080 # SSL
# - 80:8000
expose:
- 80
# - 443
# - 80
depends_on:
- postgres
volumes:
vol-test-auth-db:
external: false
networks:
testauth_network:
name: network-test_default
external: false