mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
Add version tag to migrate script (#1400)
* Add new `VERSION` to `docker_migrate.sh` script * Add missing `SAML_KEYFILE_PATH` and `SAML_CERTFILE_PATH` env vars to migrate script * Add missing `PHOENIX_PORT` var * Bump Elixir to 1.14.3 * Bump Erlang to 25.2.1 * Update docs to document new VERSION var in docker-compose.yml upgrade mechanism Fixes #1395
This commit is contained in:
7
.github/workflows/docker_publish.yml
vendored
7
.github/workflows/docker_publish.yml
vendored
@@ -25,10 +25,17 @@ jobs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get minor version of ref
|
||||
env:
|
||||
VERSION: ${{ github.ref_name }}
|
||||
id: get-minor
|
||||
run: echo "::set-output name=fragment::${VERSION%.*}"
|
||||
|
||||
- name: Copy image from Github (staging) to Docker (production)
|
||||
uses: akhilerm/tag-push-action@v2.1.0
|
||||
with:
|
||||
src: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME}}:${{ github.ref_name }}
|
||||
dst: |
|
||||
${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME}}:latest
|
||||
${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME}}:${{ steps.get-minor.outputs.fragment }}
|
||||
${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME}}:${{ github.ref_name }}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# These are used for the dev environment.
|
||||
# This should match the versions used in the built product.
|
||||
nodejs 16.17.0
|
||||
elixir 1.14.2-otp-25
|
||||
erlang 25.1.2
|
||||
elixir 1.14.3-otp-25
|
||||
erlang 25.2.1
|
||||
|
||||
# Used for static analysis
|
||||
ruby 2.7.6
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# This Dockerfile builds a development image to use for local development work
|
||||
|
||||
FROM firezone/elixir:1.14.2-otp-25.1.2
|
||||
FROM firezone/elixir:1.14.3-otp-25.2.1
|
||||
|
||||
# Install dev dependencies / convenience tools
|
||||
RUN apk add \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
ARG ELIXIR_VERSION=1.14.2
|
||||
ARG OTP_VERSION=25.1.2
|
||||
ARG ELIXIR_VERSION=1.14.3
|
||||
ARG OTP_VERSION=25.2.1
|
||||
ARG ALPINE_VERSION=3.16.3
|
||||
|
||||
ARG BUILDER_IMAGE="firezone/elixir:${ELIXIR_VERSION}-otp-${OTP_VERSION}"
|
||||
|
||||
@@ -12,16 +12,20 @@ relevant [files and folders](/reference/file-and-directory-locations/)
|
||||
before upgrading in case anything goes wrong.
|
||||
:::
|
||||
|
||||
To upgrade Firezone, follow these steps:
|
||||
Follow the steps below to upgrade Firezone:
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="Docker" value="docker" default>
|
||||
|
||||
1. Change to the Firezone installation directory:
|
||||
1. Change to your Firezone installation directory, by default `$HOME/.firezone`:
|
||||
```
|
||||
cd $HOME/.firezone
|
||||
```
|
||||
1. Update docker compose images:
|
||||
1. If your `.env` file has a `VERSION` variable, update it to the desired version.
|
||||
By default `latest` is assumed if not set. This variable is read in newer versions
|
||||
of the docker-compose.yml template to populate the `image:` key for the `firezone`
|
||||
service.
|
||||
1. Update service images:
|
||||
```
|
||||
docker compose pull
|
||||
```
|
||||
|
||||
@@ -167,6 +167,13 @@ migrate () {
|
||||
condIns $env_files "MAX_DEVICES_PER_USER"
|
||||
condIns $env_files "CONNECTIVITY_CHECKS_ENABLED"
|
||||
condIns $env_files "CONNECTIVITY_CHECKS_INTERVAL"
|
||||
condIns $env_files "SAML_CERTFILE_PATH"
|
||||
condIns $env_files "SAML_KEYFILE_PATH"
|
||||
condIns $env_files "PHOENIX_PORT"
|
||||
|
||||
# Add version for docker-compose.yml to pick up
|
||||
LATEST_VERSION=$(curl -fsSL https://api.github.com/repos/firezone/firezone/releases/latest | grep -w tag_name | cut -d '"' -f 4)
|
||||
sed -i.bak "s~VERSION=.*~VERSION=${LATEST_VERSION}~" "$installDir/.env"
|
||||
|
||||
# Add caddy opts
|
||||
echo "TLS_OPTS=\"$tlsOpts\"" >> $installDir/.env
|
||||
|
||||
Reference in New Issue
Block a user