-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
54 lines (49 loc) · 1.29 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
version: "3"
networks:
app:
name: ${APP_NAME:-app}
volumes:
db:
name: ${APP_NAME:-app}-postgres
services:
app:
build: .
container_name: ${APP_NAME:-app}
ports:
- "3000:3000"
networks:
- app
environment:
- PORT=3000
- HOST=0.0.0.0
- SECRET=${SECRET:-secret}
- GITHUB_CLIENT_ID=""
- GITHUB_CLIENT_SECRET=""
- DATABASE_URL=postgres://${DB_USERNAME:-postgres}:${DB_PASSWORD:-postgres}@${APP_NAME:-app}-postgres:5432/${DB_NAME:-postgres}?sslmode=disable
postgres:
image: postgres:alpine
container_name: ${APP_NAME:-app}-postgres
restart: always
ports:
- "5432:5432"
networks:
- app
environment:
- POSTGRES_DB=${DB_NAME:-postgres}
- POSTGRES_USER=${DB_USERNAME:-postgres}
- POSTGRES_PASSWORD=${DB_PASSWORD:-postgres}
volumes:
- db:/var/lib/postgresql/data
pgweb:
image: "sosedoff/pgweb"
container_name: ${APP_NAME:-app}-pgweb
ports:
- "8081:8081"
networks:
- app
depends_on:
- postgres
environment:
- PGWEB_SESSIONS=1
- PGWEB_LOCK_SESSION=TRUE
- PGWEB_DATABASE_URL=postgres://${DB_USERNAME:-postgres}:${DB_PASSWORD:-postgres}@${APP_NAME:-app}-postgres:5432/${DB_NAME:-postgres}?sslmode=disable&connect_timeout=20