mirror of
https://github.com/plausible/analytics.git
synced 2024-12-22 09:01:40 +03:00
Move ARG to running container instead of build container
This commit is contained in:
parent
f0e0062dc1
commit
b667d65d52
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@ -42,6 +42,8 @@ jobs:
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
build-arg: BUILD_METADATA=${{ steps.meta.outputs.json }}
|
||||
build-args: |
|
||||
BUILD_METADATA=${{ steps.meta.outputs.json }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
@ -5,10 +5,8 @@
|
||||
FROM hexpm/elixir:1.13.4-erlang-24.3.3-alpine-3.15.3 as buildcontainer
|
||||
|
||||
# preparation
|
||||
ARG APP_VER=0.0.1
|
||||
ENV MIX_ENV=prod
|
||||
ENV NODE_ENV=production
|
||||
ENV APP_VERSION=$APP_VER
|
||||
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
@ -54,6 +52,9 @@ RUN mix release plausible
|
||||
# Main Docker Image
|
||||
FROM alpine:3.15.3
|
||||
LABEL maintainer="tckb <tckb@tgrthi.me>"
|
||||
|
||||
ARG BUILD_METADATA={}
|
||||
ENV BUILD_METADATA=$BUILD_METADATA
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
RUN apk upgrade --no-cache
|
||||
|
@ -1,6 +1,6 @@
|
||||
BASE_URL=http://localhost:8000
|
||||
DATABASE_URL=postgres://postgres:postgres@127.0.0.1:5432/plausible_dev
|
||||
CLICKHOUSE_DATABASE_URL=http://127.0.0.1:8123/plausible_events_db
|
||||
DATABASE_URL=postgres://postgres:postgres@host.docker.internal:5432/plausible_dev
|
||||
CLICKHOUSE_DATABASE_URL=http://host.docker.internal:8123/plausible_events_db
|
||||
SECRET_KEY_BASE=/njrhntbycvastyvtk1zycwfm981vpo/0xrvwjjvemdakc/vsvbrevlwsc6u8rcg
|
||||
ENVIRONMENT=dev
|
||||
MAILER_ADAPTER=Bamboo.LocalAdapter
|
||||
|
@ -66,7 +66,7 @@ defmodule PlausibleWeb.Api.ExternalController do
|
||||
_ -> %{}
|
||||
end
|
||||
|
||||
build_info = System.get_env("BUILD_METADATA", "{}") |> Jason.decode!()
|
||||
build_metadata = System.get_env("BUILD_METADATA", "{}") |> Jason.decode!()
|
||||
|
||||
geo_database =
|
||||
case Geolix.metadata([:geolocation]) do
|
||||
@ -80,7 +80,7 @@ defmodule PlausibleWeb.Api.ExternalController do
|
||||
info =
|
||||
Map.merge(version, %{
|
||||
geo_database: geo_database,
|
||||
build: build_info
|
||||
build: build_metadata
|
||||
})
|
||||
|
||||
json(conn, info)
|
||||
|
Loading…
Reference in New Issue
Block a user