-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4912 from ChrisBr/deployment/ha-proxy
[frontend] Add docker-compose file for HAProxy
- Loading branch information
Showing
9 changed files
with
96 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
web: bundle exec rails server -P tmp/pids/server$NODE_NUMBER.pid | ||
delayed: bundle exec script/delayed_job.api.rb run | ||
clock: bundle exec clockworkd --log-dir=log -l -c config/clock.rb run | ||
search: bundle exec rake ts:rebuild NODETACH=true | ||
mailcatcher: mailcatcher --ip 0.0.0.0 -f --no-quit -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
defaults | ||
log global | ||
mode http | ||
option httplog | ||
option dontlognull | ||
timeout connect 5000 | ||
timeout client 50000 | ||
timeout server 50000 | ||
|
||
resolvers dockerdns | ||
nameserver dns 127.0.0.11:53 | ||
|
||
frontend localnodes | ||
bind *:80 | ||
mode http | ||
default_backend nodes | ||
|
||
backend nodes | ||
mode http | ||
balance roundrobin | ||
option forwardfor | ||
http-request set-header X-Forwarded-Port %[dst_port] | ||
http-request add-header X-Forwarded-Proto https if { ssl_fc } | ||
option httpchk HEAD /about HTTP/1.1\r\nHost:localhost | ||
server web01 frontend:3000 check resolvers dockerdns resolve-prefer ipv4 | ||
server web02 frontend_node_2:3000 check resolvers dockerdns resolve-prefer ipv4 | ||
|
||
listen stats | ||
bind :32700 | ||
stats enable | ||
stats uri / | ||
stats hide-version | ||
stats auth Admin:opensuse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
development: | ||
mysql41: 9312 | ||
bin_path: /usr/bin | ||
mem_limit: 512M | ||
charset_table: "0..9, a..z, A..Z->a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F" | ||
mysql41: <%= 9313 + ENV['NODE_NUMBER'].to_i %> | ||
indices_location: <%= File.join(Rails.root, "db", "sphinx", "development#{ENV['NODE_NUMBER']}") %> | ||
configuration_file: <%= File.join(Rails.root, "config", "development#{ENV['NODE_NUMBER']}.sphinx.conf")%> | ||
log: <%= File.join(Rails.root, "log", "development#{ENV['NODE_NUMBER']}.searchd.log") %> | ||
query_log: <%= File.join(Rails.root, "log", "development#{ENV['NODE_NUMBER']}.searchd.query.log") %> | ||
binlog_path: <%= File.join(Rails.root, "tmp", "binlog", "development#{ENV['NODE_NUMBER']}") %> | ||
pid_file: <%= File.join(Rails.root, "tmp", "pids", "development#{ENV['NODE_NUMBER']}.sphinx.pid") %> | ||
test: | ||
mysql41: 9313 | ||
bin_path: /usr/bin | ||
mem_limit: 512M | ||
charset_table: "0..9, a..z, A..Z->a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F" | ||
# To efficiently deal with large ids generated by fixtures | ||
sql_range_step: 10000000 | ||
production: | ||
mysql41: 9314 | ||
bin_path: /usr/bin | ||
mem_limit: 512M | ||
charset_table: "0..9, a..z, A..Z->a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: "2.1" | ||
services: | ||
proxy: | ||
image: haproxy:1.7 | ||
volumes: | ||
- ./contrib/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro | ||
ports: | ||
- "8080:80" | ||
- "32700:32700" | ||
depends_on: | ||
- frontend | ||
- frontend_node_2 | ||
frontend_node_2: | ||
image: openbuildservice/frontend | ||
environment: | ||
- NODE_NUMBER=2 | ||
volumes: | ||
- .:/obs | ||
- ./contrib/thinking_sphinx.yml.ha:/obs/src/api/config/thinking_sphinx.yml:ro | ||
- ./contrib/Procfile.ha:/obs/src/api/Procfile | ||
ports: | ||
- "3001:3000" | ||
- "1081:1080" | ||
depends_on: | ||
- db | ||
- cache | ||
- backend | ||
- worker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Peek.into Peek::Views::Mysql2 | ||
Peek.into Peek::Views::Dalli | ||
Peek.into Peek::Views::Host |
This file was deleted.
Oops, something went wrong.