-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-dev.yml
71 lines (66 loc) · 1.93 KB
/
docker-compose-dev.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
69
70
71
version: "2.4"
networks:
go-pb_dev:
external: false
volumes:
postgres-data-dev:
services:
###############################################################################
# Postgres database server.
# The ./services/db-server/db-healthcheck.sh script is used by Docker to
# determine the health status of the running container. This is important
# because in the depended services you can specify "service_healthy" condition
# which will make sure that the database is up and running.
db-server:
image: postgres:13-alpine
container_name: db-server
restart: unless-stopped
networks:
- go-pb_dev
volumes:
- postgres-data-dev:/var/lib/postgresql/data
- ./scripts/db-healthcheck.sh:/db-healthcheck.sh
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_USER=iliaf
- POSTGRES_PASSWORD=iliaf
- POSTGRES_DB=iliaf
- POSTGRES_PORT=5432
ports:
- 5432:5432
healthcheck:
test: ["CMD", "/db-healthcheck.sh"]
interval: 10s
timeout: 10s
retries: 5
start_period: 10s
adminer:
image: adminer
container_name: db-admin
depends_on:
db-server:
condition: service_healthy
restart: unless-stopped
networks:
- go-pb_dev
ports:
- 8888:8080
# app:
# image: iliafrenkel/go-pb:latest
# container_name: app
# depends_on:
# db-server:
# condition: service_healthy
# restart: unless-stopped
# networks:
# - go-pb_dev
# environment:
# - GOPB_API_DB_CONN_STRING=host=db-server user=iliaf password=iliaf dbname=iliaf port=5432 sslmode=disable
# - GOPB_WEB_LOGO=bighead.svg
# - GOPB_WEB_HOST=0.0.0.0
# - GOPB_API_TOKEN_SECRET=very#secret#api#token#donotshare
# - GOPB_WEB_COOKIE_AUTH_KEY=verysecretcookieauthkeydontshare
# ports:
# - 8080:8080
##
###############################################################################