-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
68 lines (65 loc) · 1.64 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
services:
nginx:
container_name: hh_nginx
build:
context: nginx/
ports:
- 8081:80
volumes:
- ./db-sources:/db-sources
depends_on:
- web
db:
container_name: hh_psql
image: postgres:12-alpine
environment:
- POSTGRES_DB=hh
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=overwritethisinprod!
- PGDATA=/data/postgres
volumes:
- postgres:/data/postgres
restart: unless-stopped
healthcheck:
# so that db won't appear as ready when still booting
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 10s
retries: 50
ports:
- "5432:5432"
pgadmin:
# From pgAdmin, you can access the postgres db with "db" as host and
# "POSTGRES_USER" and "POSTGRES_PASSWORD" as credentials
# (specified just above in the db service)
container_name: hh_pgadmin
image: dpage/pgadmin4:7
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: "False"
volumes:
- pgadmin:/var/lib/pgadmin
ports:
- "5050:80"
restart: unless-stopped
web:
container_name: hh_api
build:
context: .
dockerfile: Dockerfile
command: dev_web_start
entrypoint: /src/docker-entrypoint.sh
environment:
- DJANGO_SETTINGS_MODULE=hhub.settings
- DATABASE_URL=postgres://postgres:overwritethisinprod!@db:5432/hh
restart: on-failure
volumes:
- .:/src
ports:
- "8000:8000"
links:
- db:db
volumes:
postgres:
pgadmin: