From 404d0fa8b54b350d2c94b185d5774fd5c6cd18c9 Mon Sep 17 00:00:00 2001 From: Jamil Bou Kheir Date: Sat, 14 Nov 2020 09:07:29 -0600 Subject: [PATCH] inet dummy --- .github/workflows/ci.yml | 37 +++++-------------- config/releases.exs | 2 +- .../{build_fireguard_deb.sh => build_deb.sh} | 0 ...build_prod_release.sh => build_release.sh} | 1 - 4 files changed, 10 insertions(+), 30 deletions(-) rename scripts/{build_fireguard_deb.sh => build_deb.sh} (100%) rename scripts/{build_prod_release.sh => build_release.sh} (94%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 118d10ae5..67cd4d1b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,9 +58,11 @@ jobs: sudo dpkg -i erlang.deb sudo dpkg -i elixir.deb - name: Build release + environment: + MIX_ENV: prod run: | - scripts/build_prod_release.sh - scripts/build_fireguard_deb.sh + scripts/build_release.sh + scripts/build_deb.sh - name: Rename Built Artifacts run: | filename="fireguard_${{ github.sha }}-1_amd64.deb" @@ -90,35 +92,14 @@ jobs: # Wait for app to start sleep 10 - echo "Printing openssl conf" - sudo cat /etc/ssl/openssl.cnf - - echo "Setting NO_PROXY env var" - export NO_PROXY=$(hostname) - - echo "Showing env vars..." - printenv - - echo "Checking FireGuard service status" - sudo systemctl status fireguard - - echo "Checking FireGuard logs..." - sudo journalctl -u fireguard.service -b - - echo "Checking if FireGuard service is active" - sudo systemctl is-active fireguard + echo "Printing service status..." + sudo journalctl -u fireguard.service echo "Trying to load homepage..." - curl -i -vvv -k https://$(hostname):8800/ || true + curl -i -vvv -k https://$(hostname):8800/ - echo "Checking logs again..." - sudo journalctl -u fireguard.service -b - - echo "Attempting openssl s_client to a known server" - openssl s_client -connect google.com:443 -servername google.com -showcerts -prexit -debug - - echo "Connecting to FireGuard with openssl" - openssl s_client -connect $(hostname):8800 -servername $(hostname) -showcerts -prexit -debug + echo "Printing SSL debug info" + openssl s_client -connect $(hostname):8800 -servername $(hostname) -showcerts -prexit publish: needs: build diff --git a/config/releases.exs b/config/releases.exs index 6893aade9..0b689f469 100644 --- a/config/releases.exs +++ b/config/releases.exs @@ -63,7 +63,7 @@ config :fg_http, FgHttp.Repo, base_opts = [ port: listen_port, - transport_options: [max_connections: :infinity, socket_opts: [:inet6]], + transport_options: [max_connections: :infinity, socket_opts: [:inet6, :inet]], otp_app: :fireguard, keyfile: ssl_key_file, certfile: ssl_cert_file diff --git a/scripts/build_fireguard_deb.sh b/scripts/build_deb.sh similarity index 100% rename from scripts/build_fireguard_deb.sh rename to scripts/build_deb.sh diff --git a/scripts/build_prod_release.sh b/scripts/build_release.sh similarity index 94% rename from scripts/build_prod_release.sh rename to scripts/build_release.sh index 3ab4848d4..c8d1562b9 100755 --- a/scripts/build_prod_release.sh +++ b/scripts/build_release.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash od=$(pwd) -export MIX_ENV=prod mix local.hex --force && mix local.rebar --force mix do deps.get, deps.compile cd apps/fg_http/assets && npm ci --progress=false --no-audit --loglevel=error