Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLT-7563 Docker images #11

Merged
merged 6 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
/.spago
/dist-newstyle/
.vscode
public/app.js
public/app.js
.pre-commit-config.yaml
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Docker Image for Marlowe Runtime

LABEL description="Marlowe Runner"

FROM alpine:3.16.2

RUN apk add darkhttpd \
&& mkdir marlowe-runner

COPY public/ marlowe-runner/

WORKDIR marlowe-runner

ENV MARLOWE_WEB_SERVER_URL=http://host.containers.internal:3780

EXPOSE 8080

CMD sed -i -e "s|https://marlowe-runtime-preprod-web.scdev.aws.iohkdev.io|$MARLOWE_WEB_SERVER_URL|g" bundle.js \
&& darkhttpd /marlowe-runner --addr 0.0.0.0 --port 8080
226 changes: 226 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
version: "2.2"

services:

node:
environment:
- NETWORK=${NETWORK:?err}
healthcheck:
interval: 10s
retries: 10
test: socat -u OPEN:/dev/null UNIX-CONNECT:/ipc/node.socket
timeout: 5s
image: inputoutput/cardano-node:1.35.4
restart: unless-stopped
volumes:
- shared:/ipc
- node-db:/data

postgres:
environment:
- POSTGRES_LOGGING=true
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- TZ=UTC
healthcheck:
interval: 10s
retries: 5
test: pg_isready -U postgres
timeout: 5s
image: postgres:11.5-alpine
logging:
driver: json-file
options:
max-file: '10'
max-size: 200k
restart: unless-stopped
volumes:
- postgres:/var/lib/postgresql/data
- ./networks/${NETWORK:?err}/init.sql:/docker-entrypoint-initdb.d/init.sql
command:
- '-c'
- 'max_connections=1000'
- '-c'
- 'superuser_reserved_connections=5'
- '-c'
- 'huge_pages=try'
- '-c'
- 'max_wal_size=6GB'
- '-c'
- 'max_locks_per_transaction=256'
- '-c'
- 'max_pred_locks_per_transaction=256'
- '-c'
- 'work_mem=32MB'
- '-c'
- 'maintenance_work_mem=256MB'
ports:
- 5432:5432
chain-indexer:
environment:
- NODE_CONFIG=/node/config.json
- DB_NAME=chain_${NETWORK:?err}
- DB_USER=postgres
- DB_PASS=postgres
- DB_HOST=postgres
- CARDANO_NODE_SOCKET_PATH=/ipc/node.socket
- HTTP_PORT=3781
depends_on:
node:
condition: service_healthy
postgres:
condition: service_healthy
image: ghcr.io/input-output-hk/marlowe-chain-indexer:0.0.4
user: 0:0
restart: unless-stopped
volumes:
- shared:/ipc
- ./networks/${NETWORK:?err}/node:/node

chain-sync:
environment:
- NODE_CONFIG=/node/config.json
- HOST=0.0.0.0
- PORT=3715
- QUERY_PORT=3716
- JOB_PORT=3720
- DB_NAME=chain_${NETWORK:?err}
- DB_USER=postgres
- DB_PASS=postgres
- DB_HOST=postgres
- CARDANO_NODE_SOCKET_PATH=/ipc/node.socket
- HTTP_PORT=3782
depends_on:
chain-indexer:
condition: service_started
postgres:
condition: service_healthy
image: ghcr.io/input-output-hk/marlowe-chain-sync:0.0.4
user: 0:0
restart: unless-stopped
volumes:
- shared:/ipc
- ./networks/${NETWORK:?err}/node:/node

indexer:
environment:
- DB_NAME=chain_${NETWORK:?err}
- DB_USER=postgres
- DB_PASS=postgres
- DB_HOST=postgres
- MARLOWE_CHAIN_SYNC_HOST=chain-sync
- MARLOWE_CHAIN_SYNC_PORT=3715
- MARLOWE_CHAIN_SYNC_QUERY_PORT=3716
- MARLOWE_CHAIN_SYNC_COMMAND_PORT=3720
- HTTP_PORT=3783
depends_on:
chain-sync:
condition: service_started
postgres:
condition: service_healthy
image: ghcr.io/input-output-hk/marlowe-indexer:0.0.4
restart: unless-stopped

sync:
environment:
- HOST=0.0.0.0
- MARLOWE_SYNC_PORT=3724
- MARLOWE_HEADER_SYNC_PORT=3725
- MARLOWE_QUERY_PORT=3726
- DB_NAME=chain_${NETWORK:?err}
- MARLOWE_CHAIN_SYNC_HOST=chain-sync
- MARLOWE_CHAIN_SYNC_QUERY_PORT=3716
- DB_USER=postgres
- DB_PASS=postgres
- DB_HOST=postgres
- HTTP_PORT=3784
depends_on:
indexer:
condition: service_started
postgres:
condition: service_healthy
image: ghcr.io/input-output-hk/marlowe-sync:0.0.4
restart: unless-stopped

tx:
environment:
- HOST=0.0.0.0
- PORT=3723
- MARLOWE_CHAIN_SYNC_HOST=chain-sync
- MARLOWE_CHAIN_SYNC_PORT=3715
- MARLOWE_CHAIN_SYNC_QUERY_PORT=3716
- MARLOWE_CHAIN_SYNC_COMMAND_PORT=3720
- CONTRACT_HOST=contract
- CONTRACT_QUERY_PORT=3728
- HTTP_PORT=3785
depends_on:
- chain-sync
- contract
image: ghcr.io/input-output-hk/marlowe-tx:0.0.4
restart: unless-stopped

contract:
environment:
- HOST=0.0.0.0
- PORT=3727
- QUERY_PORT=3728
- TRANSFER_PORT=3729
- STORE_DIR=/store
- HTTP_PORT=3787
volumes:
- marlowe-contract-store:/store
image: ghcr.io/input-output-hk/marlowe-contract:0.0.4
restart: unless-stopped

proxy:
environment:
- HOST=0.0.0.0
- PORT=3700
- TRACED_PORT=3701
- TX_HOST=tx
- TX_PORT=3723
- CONTRACT_HOST=contract
- LOAD_PORT=3727
- CONTRACT_QUERY_PORT=3728
- TRANSFER_PORT=3729
- SYNC_HOST=sync
- MARLOWE_SYNC_PORT=3724
- MARLOWE_HEADER_SYNC_PORT=3725
- MARLOWE_QUERY_PORT=3726
- HTTP_PORT=3786
depends_on:
- sync
- tx
- contract
image: ghcr.io/input-output-hk/marlowe-proxy:0.0.4
restart: unless-stopped
ports:
- 3700:3700
- 3701:3701

web-server:
environment:
- PORT=3780
- RUNTIME_HOST=proxy
- RUNTIME_PORT=3701
depends_on:
- proxy
image: ghcr.io/input-output-hk/marlowe-web-server:0.0.4
restart: unless-stopped
ports:
- 3780:3780

marlowe-runner:
image: docker.io/bwbush/marlowe-runner:latest
environment:
- MARLOWE_RT_WEBSERVER_URL=${MARLOWE_RT_WEBSERVER_URL:?err}
depends_on:
- web-server
ports:
- 8080:8080

volumes:
node-db: null
postgres: null
shared: null
marlowe-contract-store: null
Loading
Loading