Skip to content
Merged
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
3 changes: 1 addition & 2 deletions config/basicauth/packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,4 @@ proxy:
port_http: 80
port_https: 443
image:
name: packit-proxy
tag: main
build: ../../proxy
3 changes: 1 addition & 2 deletions config/basicauthcustombrand/packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ proxy:
port_http: 80
port_https: 443
image:
name: packit-proxy
tag: main
build: ../../proxy

## Branding configuration
brand:
Expand Down
6 changes: 4 additions & 2 deletions config/complete/packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ proxy:
port_http: 80
port_https: 443
image:
name: packit-proxy
tag: main
# Alternatively, and in most deployement scenarios, use the following:
# name: packit-proxy
# tag: main
build: ../../proxy

## Standard configuration for using LetsEncrypt certs with acme-buddy.
## If this section is not included, the proxy will create
Expand Down
3 changes: 1 addition & 2 deletions config/githubauth/packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ proxy:
port_http: 80
port_https: 443
image:
name: packit-proxy
tag: main
build: ../../proxy

vault:
## Address of the vault server. This should be a string if it is
Expand Down
3 changes: 1 addition & 2 deletions config/nodemo/packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,4 @@ proxy:
port_http: 80
port_https: 443
image:
name: packit-proxy
tag: main
build: ../../proxy
3 changes: 1 addition & 2 deletions config/novault/packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,4 @@ proxy:
port_http: 80
port_https: 443
image:
name: packit-proxy
tag: main
build: ../../proxy
3 changes: 1 addition & 2 deletions config/runner-private/packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ proxy:
port_http: 80
port_https: 443
image:
name: packit-proxy
tag: main
build: ../../proxy

vault:
addr: https://vault.dide.ic.ac.uk:8200
Expand Down
3 changes: 1 addition & 2 deletions config/runner/packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,4 @@ proxy:
port_http: 80
port_https: 443
image:
name: packit-proxy
tag: main
build: ../../proxy
4 changes: 0 additions & 4 deletions proxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ FROM nginx:1.29
# Only used for generating self-signed certificates
RUN apt-get update && apt-get install -y openssl

# Clear out existing configuration
RUN rm /etc/nginx/conf.d/default.conf

VOLUME /var/log/nginx
VOLUME /run/proxy

COPY nginx.conf /etc/nginx/nginx.conf.template
COPY bin /usr/local/bin
COPY ssl /usr/local/share/ssl

Expand Down
4 changes: 2 additions & 2 deletions proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ The configuration takes as a starting point [`montagu-proxy`](https://github.com

### Configuration

Before starting we need to know what we are proxying
(i.e., the name of the `packit` and `packit-api` containers on the docker network) and what the proxy will be seen as to the outside world (the hostname, and ports for http and https). The entrypoint takes these four values as arguments.
The proxy image does not embed an `nginx.conf` file. It is `packit-deploy`'s responsibility to generate one and inject into the container before starting it.
See the `src/packit_deploy/templates/nginx.conf.j2` file for the configuration template.

### SSL Certificates

Expand Down
18 changes: 0 additions & 18 deletions proxy/bin/packit-proxy
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
#!/usr/bin/env bash
set -eu

if [ "$#" -eq 5 ]; then
export HTTP_HOST=$1
export HTTP_PORT=$2
export HTTPS_PORT=$3
export PACKIT_API=$4
export PACKIT=$5
else
echo "Usage: HOSTNAME PORT_HTTP PORT_HTTPS PACKIT_API PACKIT"
echo "e.g. docker run ... montagu.vaccineimpact.org 80 443 packit_api packit"
exit 1
fi

echo "We will listen on ports $HTTP_PORT (http) and $HTTPS_PORT (https)"
echo "with hostname $HTTP_HOST, proxying Packit from $PACKIT"

envsubst '$HTTP_HOST,$HTTP_PORT,$HTTPS_PORT, $PACKIT_API, $PACKIT' \
< /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf

# These paths must match the paths as used in the nginx.conf
PATH_CONFIG=/run/proxy
PATH_CERT="$PATH_CONFIG/certificate.pem"
Expand Down
90 changes: 0 additions & 90 deletions proxy/nginx.conf

This file was deleted.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ classifiers = [
]
dependencies = [
"click",
"constellation~=1.4.6",
"constellation~=1.5.0",
"docker",
"jinja2",
]

[project.urls]
Expand Down
Loading