Skip to content

Commit

Permalink
deployment : fix version documentation and add nginx, apache confs
Browse files Browse the repository at this point in the history
  • Loading branch information
angad-k committed Feb 10, 2022
1 parent 75d72e9 commit 832f88e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BIN_NAME="pinger"
# set the default version to undefined
if [ -z ${VERSION} ]
then
CURRENT_TAG="undefined"
CURRENT_TAG="dev"
else
CURRENT_TAG="${VERSION}"
fi
Expand Down
11 changes: 11 additions & 0 deletions deploy/pinger.apache.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Listen 80
<VirtualHost *:80>
ServerName pinger.staging.sdslabs.* pinger.sdslabs.*
# Other directives here
<Location />
ProxyPass http://127.0.0.1:9010
ProxyPassReverse http://127.0.0.1:9010
Order allow,deny
Allow from all
</Location>
</VirtualHost>
19 changes: 19 additions & 0 deletions deploy/pinger.nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
server {
listen 80;
server_name pinger.staging.sdslabs.* pinger.sdslabs.*;

location / {
client_max_body_size 20M;
proxy_pass http://127.0.0.1:9010;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port $server_port;
}
}
4 changes: 3 additions & 1 deletion docs/src/contributing/build-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ required for the frontend. Once we have our resources ready, we can build the
executable using the `make build` command. We have `VERSION` flag for setting
the version of the binary.

> **Note:** In case no `VERSION` is provided, version defaults to `dev`
```sh
# Building the binary
$ make build VERSION=1.0.1
Expand Down Expand Up @@ -62,7 +64,7 @@ $ make docker TAG="pinger:v1.2.3"
## Docker Compose

A `docker-compose.yml` is also provided to get pinger started more easier.
Just add an `agent.yml` according to your use case, replace
Just add an `agent.yml` according to your use case, replace
`CMD [ "./pinger", "version" ]` in the `Dockerfile` with `CMD [ "./pinger", "agent" ]`
and then run `docker-compose up`.
This will get both the timescale db and pinger container up and running in no time!
Expand Down

0 comments on commit 832f88e

Please sign in to comment.