-
Notifications
You must be signed in to change notification settings - Fork 47
/
docker-compose.yml
48 lines (48 loc) · 1.46 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
# A docker-compose file to host a hiSHtory backend. To use:
# 1. Update TODO_YOUR_POSTGRES_PASSWORD_HERE
# 2. `docker compose -f backend/server/docker-compose.yml build`
# 3. `docker compose -f backend/server/docker-compose.yml up`
# 4. Point your hiSHtory client at the server by putting `export HISHTORY_SERVER=http://1.2.3.4` in your shellrc
# 5. Run `hishtory init` to initialize hiSHtory with the local server
# 6. [Optional, but recommended] Add a TLS proxy to enable https
version: "3.8"
networks:
hishtory:
driver: bridge
services:
postgres:
image: postgres
restart: unless-stopped
networks:
- hishtory
environment:
POSTGRES_PASSWORD: TODO_YOUR_POSTGRES_PASSWORD_HERE
POSTGRES_DB: hishtory
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: pg_isready -U postgres
interval: 10s
timeout: 3s
hishtory:
depends_on:
postgres:
condition: service_healthy
networks:
- hishtory
build:
context: ../../
dockerfile: ./backend/server/Dockerfile
restart: unless-stopped
deploy:
restart_policy:
condition: on-failure
delay: 3s
environment:
HISHTORY_POSTGRES_DB: postgresql://postgres:TODO_YOUR_POSTGRES_PASSWORD_HERE@postgres:5432/hishtory?sslmode=disable
HISHTORY_COMPOSE_TEST: $HISHTORY_COMPOSE_TEST
ports:
- 80:8080
volumes:
postgres-data: