forked from plausible/analytics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'plausible:master' into master
- Loading branch information
Showing
232 changed files
with
14,790 additions
and
4,246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Add preview environment URL to PR | ||
|
||
on: | ||
pull_request: | ||
types: [labeled] | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
|
||
jobs: | ||
comment: | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'preview') }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Comment with preview URL | ||
uses: thollander/[email protected] | ||
with: | ||
message: | | ||
<div align="center"> | ||
|Preview environment👷🏼♀️🏗️ | | ||
|:-:| | ||
| [PR-${{env.PR_NUMBER}}](https://pr-${{env.PR_NUMBER}}.review.plausible.io) | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
erlang 26.2.1 | ||
elixir 1.16.0-otp-26 | ||
erlang 27.0 | ||
elixir 1.17.1-otp-27 | ||
nodejs 21.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# platform specific, it makes sense to build it in the docker | ||
|
||
#### Builder | ||
FROM hexpm/elixir:1.16.0-erlang-26.2.1-alpine-3.18.4 as buildcontainer | ||
FROM hexpm/elixir:1.17.1-erlang-27.0-alpine-3.18.6 as buildcontainer | ||
|
||
ARG MIX_ENV=ce | ||
|
||
|
@@ -28,7 +28,7 @@ COPY mix.lock ./ | |
COPY config ./config | ||
RUN mix local.hex --force && \ | ||
mix local.rebar --force && \ | ||
mix deps.get --only prod && \ | ||
mix deps.get --only ${MIX_ENV} && \ | ||
mix deps.compile | ||
|
||
COPY assets/package.json assets/package-lock.json ./assets/ | ||
|
@@ -54,7 +54,7 @@ COPY rel rel | |
RUN mix release plausible | ||
|
||
# Main Docker Image | ||
FROM alpine:3.18.4 | ||
FROM alpine:3.18.6 | ||
LABEL maintainer="plausible.io <[email protected]>" | ||
|
||
ARG BUILD_METADATA={} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { useEffect, useRef } from 'react'; | ||
|
||
// A custom hook that behaves like `useEffect`, but | ||
// the function does not run on the initial render. | ||
export function useMountedEffect(fn, deps) { | ||
const mounted = useRef(false) | ||
|
||
useEffect(() => { | ||
if (mounted.current) { | ||
fn() | ||
} else { | ||
mounted.current = true | ||
} | ||
}, deps) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.