Skip to content

Commit

Permalink
Use secrets to store password in docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
j16r committed Jun 26, 2018
1 parent 4715215 commit f8d1afb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
version: '3'
version: '3.1'

services:

geth:
image: ethereum/client-go
restart: on-failure
command: --dev --mine --networkid 17 --wsorigins "*" --ws --dev.period 2 --wsaddr 172.16.1.100 --wsport 18546 --datadir /root/gethnet/datadir --unlock "0x9ca9d2d5e04012c9ed24c0e513c9bfaa4a2dd77f" --ipcdisable --password /root/gethnet/password.txt
command: --dev --mine --networkid 17 --wsorigins "*" --ws --dev.period 2 --wsaddr 172.16.1.100 --wsport 18546 --datadir /root/gethnet/datadir --unlock "0x9ca9d2d5e04012c9ed24c0e513c9bfaa4a2dd77f" --ipcdisable --password /run/secrets/node_password
volumes:
- ./internal/gethnet/:/root/gethnet
networks:
gethnet:
ipv4_address: 172.16.1.100
ports: []
secrets:
- node_password

chainlink:
image: smartcontract/chainlink
command: node -d -p "T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ"
command: node -d -p /run/secrets/node_password
restart: on-failure
volumes:
- ./internal/clroot/:/root/clroot
Expand All @@ -33,6 +35,9 @@ services:
- geth
ports:
- 6688:6688
- 6689:6689
secrets:
- node_password

networks:
gethnet:
Expand All @@ -41,3 +46,7 @@ networks:
driver: default
config:
- subnet: 172.16.1.0/24

secrets:
node_password:
file: ./internal/clroot/password.txt

0 comments on commit f8d1afb

Please sign in to comment.