mirror of
https://github.com/status-im/infra-faucet.git
synced 2025-02-24 08:38:32 +00:00
fix faucet consul config, add container auto updates
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
d54ec8baf3
commit
8fc95fd208
5
ansible/group_vars/faucet-master.yml
Normal file
5
ansible/group_vars/faucet-master.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
# stage contains the network name
|
||||
faucet_network: '{{ stage }}'
|
||||
faucet_account_pass: '{{lookup("passwordstore", "services/faucet/account-pass")}}'
|
||||
faucet_domain: 'faucet-{{ stage }}.status.im'
|
@ -9,10 +9,10 @@ miner_network_ids:
|
||||
faucet_account_pass: ~
|
||||
faucet_domain: ~
|
||||
faucet_network: ~
|
||||
faucet_network_id: '{{ faucet_network_ids[faucet_network] | mandatory }}'
|
||||
faucet_network_id: '{{ miner_network_ids[faucet_network] | mandatory }}'
|
||||
|
||||
faucet_cont_tag: 'latest'
|
||||
faucet_cont_image: 'statusteam/faucet:{{ miner_cont_tag }}'
|
||||
faucet_cont_tag: 'fixed'
|
||||
faucet_cont_image: 'statusteam/faucet:{{ faucet_cont_tag }}'
|
||||
faucet_cont_name: 'faucet-api'
|
||||
faucet_http_port: 3001
|
||||
|
||||
@ -20,7 +20,7 @@ faucet_geth_tag: 'v1.8.23'
|
||||
faucet_geth_image: 'ethereum/client-go:{{ faucet_geth_tag }}'
|
||||
faucet_geth_name: 'faucet-geth'
|
||||
faucet_geth_vol: '/docker/{{ faucet_geth_name }}'
|
||||
faucet_geth_rpc_port: 8454
|
||||
faucet_geth_rpc_port: 8545
|
||||
|
||||
# generic container settings
|
||||
cont_state: started
|
||||
|
@ -4,11 +4,11 @@
|
||||
vars:
|
||||
consul_config_name: '{{ faucet_cont_name | replace("-", "_") }}'
|
||||
consul_services:
|
||||
- id: '{{ faucet_cont_name }}'
|
||||
name: '{{ faucet_cont_name }}'
|
||||
- name: '{{ faucet_cont_name }}'
|
||||
tags: ['{{ env }}.{{ stage }}', 'faucet', 'api']
|
||||
port: '{{ faucet_http_port }}'
|
||||
tags: ['{{ env }}.{{ stage }}', 'faucet']
|
||||
checks:
|
||||
- id: faucet-http-health
|
||||
name: Faucet HTTP API
|
||||
type: http
|
||||
script: 'http://127.0.0.1:{{ faucet_http_port }}/faucet-info'
|
||||
http: 'http://localhost:{{ faucet_http_port }}/faucet-info'
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: Create faucet container
|
||||
- name: 'Create faucet container: {{ faucet_cont_name }}'
|
||||
docker_container:
|
||||
name: '{{ faucet_cont_name }}'
|
||||
image: '{{ faucet_cont_image }}'
|
||||
@ -9,6 +9,11 @@
|
||||
state: '{{ cont_state }}'
|
||||
recreate: '{{ cont_recreate }}'
|
||||
restart: '{{ cont_restart }}'
|
||||
# enable automatic container updates
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: 'true'
|
||||
links:
|
||||
- '{{ faucet_geth_name }}:geth'
|
||||
ports:
|
||||
- '127.0.0.1:{{ faucet_http_port | mandatory }}:{{ faucet_http_port }}'
|
||||
command: |
|
||||
|
@ -1,16 +1,16 @@
|
||||
---
|
||||
- name: Create container folders
|
||||
file:
|
||||
path: '{{ miner_geth_vol }}/data'
|
||||
path: '{{ faucet_geth_vol }}/data'
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: dockremap
|
||||
group: docker
|
||||
|
||||
- name: Create faucet container
|
||||
- name: 'Create geth container: {{ faucet_geth_name }}'
|
||||
docker_container:
|
||||
name: '{{ faucet_cont_name }}'
|
||||
image: '{{ faucet_cont_image }}'
|
||||
name: '{{ faucet_geth_name }}'
|
||||
image: '{{ faucet_geth_image }}'
|
||||
user: root
|
||||
pull: true
|
||||
restart_policy: always
|
||||
@ -26,5 +26,7 @@
|
||||
--rpcaddr=0.0.0.0
|
||||
--rpcport={{ faucet_geth_rpc_port }}
|
||||
--v5disc
|
||||
exposed_ports:
|
||||
- '{{ faucet_geth_rpc_port }}'
|
||||
volumes:
|
||||
- '{{ miner_geth_vol }}/data:/date'
|
||||
- '{{ faucet_geth_vol }}/data:/date'
|
||||
|
Loading…
x
Reference in New Issue
Block a user