-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
67 lines (63 loc) · 1.89 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
version: '3'
services:
core-postgres:
image: postgres:9.6-alpine
restart: on-failure
environment:
- POSTGRES_PASSWORD=mysecretpassword
- POSTGRES_DB=stellar
ports:
- "5641:5432"
volumes:
- "core-db-data:/var/lib/postgresql/data"
network_mode: '${NETWORK_MODE:-bridge}'
core:
# to use a specific version of stellar core
# image: stellar/stellar-core:$VERSION
image: stellar/stellar-core
depends_on:
- core-postgres
restart: always
ports:
- "11625:11625"
- "11626:11626"
env_file:
# to connect to the public stellar network
#- ./stellar-core-pubnet.env
- ./stellar-core-testnet.env
command: /start compat_minimal nopsql fresh
network_mode: '${NETWORK_MODE:-bridge}'
horizon-postgres:
image: postgres:9.6-alpine
restart: on-failure
environment:
- POSTGRES_DB=horizon
ports:
- "5432:5432"
volumes:
- "horizon-db-data:/var/lib/postgresql/data"
network_mode: '${NETWORK_MODE:-bridge}'
horizon:
depends_on:
- horizon-postgres
- core
build:
# set build context to the root directory of the go monorepo
context: ../../../
dockerfile: services/horizon/docker/Dockerfile
restart: on-failure
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgres://postgres@host.docker.internal:5432/horizon?sslmode=disable
- STELLAR_CORE_DATABASE_URL=postgres://postgres:mysecretpassword@host.docker.internal:5641/stellar?sslmode=disable
# to connect to the public stellar network
#- NETWORK_PASSPHRASE=Public Global Stellar Network ; September
- NETWORK_PASSPHRASE=Test SDF Network ; September 2015
- STELLAR_CORE_URL=http://host.docker.internal:11626
- INGEST=true
network_mode: '${NETWORK_MODE:-bridge}'
command: ["--apply-migrations"]
volumes:
core-db-data:
horizon-db-data: