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

fix swarm example #774

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions examples/swarm/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ETCD_TOKEN=hapg-etcd
9 changes: 9 additions & 0 deletions examples/swarm/docker-compose-etcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ services:
- --initial-cluster=etcd-00=http://etcd-00:2380,etcd-01=http://etcd-01:2380,etcd-02=http://etcd-02:2380
- --initial-cluster-state=new
- --initial-cluster-token=${ETCD_TOKEN}
- --auto-compaction-mode=revision # If You are using etcd only for stolon then You need no revision history at all
- --auto-compaction-retention=100 # on etcd (https://github.com/sorintlab/stolon/blob/master/doc/architecture.md#etcdv3-compaction)
- --log-level=warn
volumes:
- etcd-00vol:/data.etcd
networks:
Expand All @@ -38,6 +41,9 @@ services:
- --initial-cluster=etcd-00=http://etcd-00:2380,etcd-01=http://etcd-01:2380,etcd-02=http://etcd-02:2380
- --initial-cluster-state=new
- --initial-cluster-token=${ETCD_TOKEN}
- --auto-compaction-mode=revision
- --auto-compaction-retention=100
- --log-level=warn
volumes:
- etcd-01vol:/data.etcd
networks:
Expand All @@ -59,6 +65,9 @@ services:
- --initial-cluster=etcd-00=http://etcd-00:2380,etcd-01=http://etcd-01:2380,etcd-02=http://etcd-02:2380
- --initial-cluster-state=new
- --initial-cluster-token=${ETCD_TOKEN}
- --auto-compaction-mode=revision
- --auto-compaction-retention=100
- --log-level=warn
volumes:
- etcd-02vol:/data.etcd
networks:
Expand Down
2 changes: 1 addition & 1 deletion examples/swarm/docker-compose-pg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ services:
- pgkeeper2:/var/lib/postgresql/data
secrets:
- pgsql
command: gosu stolon stolon-keeper --pg-listen-address keeper2 --pg-repl-username replication --uid keeper2 --pg-su-username postgres --pg-su-passwordfile /run/secrets/pgsql --pg-repl-passwordfile /run/secrets/pgsql --data-dir /var/lib/postgresql/data --cluster-name stolon-cluster --store-backend=etcdv3 --store-endpoints http://etcd-00:2379,http://etcd-01:2379,http://etcd-02:2379 --log-level debug
command: gosu stolon stolon-keeper --pg-listen-address keeper2 --pg-repl-username replication --uid keeper2 --pg-su-username postgres --pg-su-passwordfile /run/secrets/pgsql --pg-repl-passwordfile /run/secrets/pgsql_repl --data-dir /var/lib/postgresql/data --cluster-name stolon-cluster --store-backend=etcdv3 --store-endpoints http://etcd-00:2379,http://etcd-01:2379,http://etcd-02:2379 --log-level debug
networks:
- etcd_etcd
- pgdb
Expand Down