Skip to content

Commit

Permalink
Merge pull request #2 from topology-foundation/fix-docker
Browse files Browse the repository at this point in the history
small updates to docker composes and tasks
  • Loading branch information
d-roak authored Nov 5, 2024
2 parents 05a0bb2 + b4b7850 commit d2075cb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ansible/roles/topology-node/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
---
- name: Generate private key seed
community.crypto.openssh_keypair:
path: /opt/topology/infra/.private_key_seed

- name: Read the private key seed content directly
shell: "cat /opt/topology/infra/.private_key_seed | tr -d '\n'"
register: private_key_seed

- name: Create .env file with environment variables
copy:
dest: /opt/topology/infra/.env
content: |
ADDRESSES=/ip4/0.0.0.0/tcp/50000/ws,/ip4/0.0.0.0/tcp/50001
PRIVATE_KEY_SEED={{ private_key_seed.stdout }}
- name: Run topology on docker
community.docker.docker_compose_v2:
state: present
pull: always
project_src: /opt/topology/infra/docker
files:
- docker-compose.topology.yaml
Expand Down
3 changes: 3 additions & 0 deletions docker/docker-compose.topology.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
services:
bootstrap:
image: ghcr.io/topology-foundation/ts-topology:latest
restart: always
ports:
- ${PORT}:50000
command: -m ${MODE}
volumes:
- /opt/topology/infra/.env:/node/.env

0 comments on commit d2075cb

Please sign in to comment.