-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (48 loc) · 1.04 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
version: "3.9"
services:
postgres:
image: postgres
restart: always
ports:
- "5432:5432"
volumes:
- ./postgres-data:/var/lib/postgresql/data
logging:
driver: none
environment:
- POSTGRES_USER=vivek
- POSTGRES_PASSWORD=password
- POSTGRES_DB=twitpro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: ./Dockerfile.dev
volumes:
- .:/app
env_file: .env
ports:
- "8000:8000"
links:
- postgres:postgres
depends_on:
postgres:
condition: service_healthy
# pgweb:
# container_name: pgweb
# restart: always
# image: sosedoff/pgweb
# ports:
# - "8081:8081"
# logging:
# driver: none
# links:
# - postgres:postgres # my database container is called postgres, not db
# environment:
# - DATABASE_URL=postgresql://vivek:password@postgres/twitpro?sslmode=disable
# depends_on:
# - backend