-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (97 loc) · 3.19 KB
/
docker-compose.yml
File metadata and controls
105 lines (97 loc) · 3.19 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# docker compose -f docker-compose-agent-ipfs.yml up --build -d
##################################################################################
## Docker-Compose for a Single agent + Single IPFS node
##
## Agent: alice
## Ports:
## Alice = 3000 / 5002 (HTTP) & 5003 (WS)
## IPFS = 8080 (HTTP)
## Network: testnet
##
##################################################################################
services:
##################################################################################
## Alice #########################################################################
##################################################################################
alice:
container_name: alice
build:
context: .
dockerfile: Dockerfile
restart: always
scale: 0
depends_on:
ipfs:
condition: service_healthy
ports:
- '5002:5002' #5000 is used for AirPlay in MacOS
- '5003:5003'
- '3000:3000'
- '8443:8443'
command: >
sh -c "
npm i -g pino-pretty
node ./node_modules/.bin/knex migrate:latest
npm start | pino-pretty -c -S"
environment:
- ENDPOINT='http://alice:5002, ws://alice:5003'
- IPFS_ORIGIN=http://ipfs:5001
- POSTGRES_HOST=veritable-cloudagent-postgres
- POSTGRES_PORT=5432
- POSTGRES_USERNAME=postgres
- POSTGRES_PASSWORD=postgres
- DID_WEB_ENABLED=true
- DID_WEB_USE_DEV_CERT=true
- DID_WEB_PORT=8443
- DID_WEB_DEV_CERT_PATH=/alice.pem
- DID_WEB_DEV_KEY_PATH=/alice-key.pem
- DID_WEB_DB_NAME=did-web-server
- DID_WEB_DOMAIN=localhost%3A8443
- DID_WEB_SERVICE_ENDPOINT=http://localhost:5002
- NODE_EXTRA_CA_CERTS=/rootCA.pem
networks:
- testnet
volumes:
- ./alice+1.pem:/alice.pem
- ./alice+1-key.pem:/alice-key.pem
- ${NODE_EXTRA_CA_CERTS}:/rootCA.pem
##################################################################################
## IPFS ##########################################################################
##################################################################################
ipfs:
container_name: ipfs
build:
context: ./docker/ipfs
dockerfile: Dockerfile
ports:
# - "4001:4001" # ipfs swarm - expose if needed/wanted
# - "5001:5001" # ipfs api - expose if needed/wanted
- '8080:8080' # ipfs gateway - expose if needed/wanted
volumes:
- ipfs:/data/ipfs
networks:
- testnet
##################################################################################
## PostgreSQL ####################################################################
##################################################################################
postgres:
container_name: veritable-cloudagent-postgres
image: postgres:18.3-alpine
restart: on-failure
ports:
- 5432:5432
volumes:
- veritable-cloudagent-storage:/var/lib/postgresql
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=did-web-server
networks:
- testnet
volumes:
ipfs:
veritable-cloudagent-storage:
networks:
testnet:
name: testnet
driver: bridge