Commit Graph

61 Commits

Author SHA1 Message Date
Adam Rutkowski b64a2355a0
Platform upgrade: elixir 1.19.4 and otp 27.3.4.6 (#5920)
* Platform upgrade: elixir 1.19.4 and otp 27.3.4.6

* !fixup

* credo

* credo

* Bump cache

* fix docker image tag

* hum

* hum

* Match docker images

* Define ALPINE_VERSION once

* fixup
2025-12-01 12:50:49 +00:00
hq1 98ffeca6a6
Stack bump: Elixir 1.18, OTP 27.3.1, Node 23.2.0, (#5264)
* Update tool versions

* Update deps

* Address runtime/compilation warnings

* Format

* Update Dockerfile

* wip

* Simpler

* oof

* hum

* format

* Bump cache vsn

* oops

* Fixup

* Fix dockerfile

* Try bumping node too 🤷

* Revert "Try bumping node too 🤷"

This reverts commit cdbe8d4a78.

* Reapply "Try bumping node too 🤷"

This reverts commit 12cafae22b.

* Welp
2025-04-02 12:39:22 +00:00
hq1 552528d62d
Bump elixir to 1.17.3 and OTP to 27.2.1 (#5040)
* Bump elixir to 1.17.3 and OTP to 27.2.1

To address https://github.com/erlang/otp/issues/8588

* Bump cache

* Bump secondary alpine

* Try unzip due to `{:error, :bad_eocd}` on OTP 27.2.1

* jfc

* Revert "jfc"

This reverts commit 018d33fadc.

* Revert "Try unzip due to `{:error, :bad_eocd}` on OTP 27.2.1"

This reverts commit e04750ff82.

* huh

* Use Plausible.File.mv!

* Another one

* fixup

* Format

* Another one

* Format

* Update test/plausible/exports_test.exs

Co-authored-by: ruslandoga <ruslandoga+gh@icloud.com>

* Bump CI cache again

---------

Co-authored-by: ruslandoga <ruslandoga+gh@icloud.com>
2025-02-10 08:17:10 +00:00
Uku Taht 6c30f62d5d
Upgrade deps, add storybook (#4947)
* Add `<.dropdown_item>`

* Make the ellipsis menu functional again

* Upgrade deps so that storybook can be added

* Add storybook and dropdown story

* Remove lingering warnings/errors

* Add color mode to storybook

* Use new liveview used_input? function

* Alpine improvements

* Add select input to storybook

* Bring back `render_form` for CRM

* Configure eslint so it can see deps

* Remove LiveViewTest patch

* Fix test for phoenix liveview 1.0

* Build assets in prod

* Fix tests

* Attempt to fix lint error

* Add explicit text color to input

* mix format

* Format after merge master

* Add moduledocs

* Only run storybook in production

* Update storybook dependency

* Mix format
2025-01-13 12:31:18 +00:00
Karl-Aksel Puulmann a3241c2f24
[WIP] Pin nodejs version to be the same as .tool-versions (#4945)
* Only notify of failure on master

* Pin nodejs version to be the same as .tool-versions
2025-01-08 08:20:53 +00:00
RobertJoonas 281f3ecdd7
Fix docker build + FE test (#4933)
* fix docker build

* fix FE test
2025-01-02 11:10:36 +00:00
Karl-Aksel Puulmann dd1313f360
Solve build failure (#4586)
Building Dockerfile seems to be failing now with the following error:
```
Dockerfile:72
--------------------
  70 |       && if [ "$MIX_ENV" = "ce" ]; then apk add --no-cache certbot; fi
  71 |
  72 | >>> COPY --from=buildcontainer --chmod=a+rX /app/_build/${MIX_ENV}/rel/plausible /app
  73 |     COPY --chmod=755 ./rel/docker-entrypoint.sh /entrypoint.sh
  74 |
--------------------
ERROR: failed to solve: invalid chmod parameter: 'a+rX'. it should be octal string and between 0 and 07777
```

Link: https://github.com/plausible/analytics/actions/runs/10898788870/job/30242872415

Not sure _why_ given this line hasn't changed in ages, but perhaps
something to do with buildx changes. If preview deploy succeeds in this,
it should fix the issue.
2024-09-17 09:18:08 +00:00
ruslandoga 2180ab4764
Auto HTTPS in CE (#4491)
* auto https

* changelog

* enable auto-tls only when http_port is 80

* make erlang ssl less verbose

* simplify config

* simplify config

* fix ce_dev typo

* fix another typo

---------

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
2024-09-10 14:15:43 +02:00
ruslandoga 6c7f123d2c
Add better assets compression to CE (#4476)
* add better assets compression to ce

* changelog

* fix conditional compilation

* improve changelog message

* don't need zstd
2024-09-03 13:54:11 +02:00
ruslandoga b73bdf932f
add /var/lib/plausible (#4275)
Co-authored-by: Cenk Kücük <cenk@plausible.io>
2024-08-28 13:44:53 +02:00
ruslandoga 7efcd9621f
update alpine version to 3.20.1 (#4478)
Co-authored-by: hq1 <hq@mtod.org>
2024-08-28 13:11:37 +02:00
ruslandoga 8b06c91b0c
fix dockerfile warning (#4477) 2024-08-28 08:16:06 +02:00
ruslandoga 5382020ff0
fix CE Docker build (#4271) 2024-06-25 07:13:59 +02:00
ruslandoga 5a0718aa75
update runtime to elixir-1.17.1 and erlang-27.0 (#4255)
* update runtime to elixir-1.17.1 and erlang-27.0

* update credo

* fix some warnings in tests

* temp fix (backport)

---------

Co-authored-by: hq1 <hq@mtod.org>
2024-06-24 13:22:33 +02:00
ruslandoga 9687fa786d
remove Plausible Analytics metions from CE (#4121)
* remove Plausible Analytics metions from CE

* update tests

* still mention Plausible Analytics on landing page
2024-05-23 09:43:01 +02:00
hq1 d6824de1ad
Rename internal build symbols (#3942)
* Rename internal build symbols

* Rename remaining + add `on_ce` macro

cc @ruslandoga
2024-04-29 08:05:33 +02:00
ruslandoga 07b714a143
Update Sentry (#3843)
* update Sentry

* Sentry.HTTPClient.child_spec is now optional

* Sentry.EventFilter is deprecated

* update sentry to 10.2.0

* fix dialyzer warnings
2024-03-18 10:10:20 +01:00
ruslandoga 83a46fb47e
Dockerfile and co updates (#3811)
* wip

* more env, setup user before packages to avoid them picking our uid

* make entrypoint.sh executable by all again

* apparently it's a best practice to have executables be owned by root

* make entrypoint executable in COPY

* stop writing to /app, write to /tmp if needed

* fewer changes

* system user

* keep same style for multiline commands

* fewer changes

* add changelog entry

* fix group assignment for plausible user

* use gid=999

* no home

* no home

* add gecos

* add plausible user to nogroup instead of creating a custom one

* eh

* fewer changes

* fewer changes

* fewer changes

* use PERSISTENT_CACHE_DIR instead of STORAGE_DIR

* ignore more

* cleanup

* remove hex timeout env var

* use ERL_FLAGS=+JMsingle true in public builds

* fallback to /tmp and nest under /tzdata_data/ for tzdata

---------

Co-authored-by: Cenk Kücük <cenk@plausible.io>
2024-03-08 14:33:55 +00:00
hq1 32456d4348
Upgrade stack (deps, elixir 1.16, OTP 26.2.1) (#3678)
* Bump asdf erlang & elixir

* Bump erlang/elixir in the dockerfile

* Remove Oban.Stager config as per https://github.com/sorentwo/oban/blob/main/guides/upgrading/v2.14.md

* Configure Oban for tests as per https://github.com/sorentwo/oban/blob/main/guides/upgrading/v2.14.md

* Mark sampling hint clause with unsafe fragment

Any other/recommended way to do that? cc @ruslandoga

* Address String.slice/2 deprecation

* Update deps

* Address 0.0 matching warning

* Make funnel settings work

although this is probably not the best way to do it.
Needs revisiting, not sure what broke it - could not find
any breaking changes in related dependencies.

* Migrate oban as per https://github.com/sorentwo/oban/blob/main/guides/upgrading/v2.17.md

* Update credo

* Bump CI cache

* Use `Bypass.pass` to avoid exit shutdown message
2024-01-11 08:48:04 +01:00
hq1 bd7deb5631
Update dockerfile for build options (#3567)
* Update dockerfile for build options

* Start permanent on small

* Default to small

* Default to small fixup
2023-11-30 12:39:34 +01:00
hq1 819449f19a
Include extra in docker image (#3537) 2023-11-20 13:21:56 +01:00
Uku Taht cfe81d6d3f
Simplify asset building (#3459)
* Add tailwind and esbuild

* Remove unused images

* Move unprocessed assets to priv directory

* Fix applyTheme script

* Remove autoprefixer

* Update bundlemon

* Remove babel config

* Revert "Remove autoprefixer"

This reverts commit fc60c31c73.

* Make dashboard react file work

* Fix app.css imports

* Remove autoprefixer

* Add back in robots.txt

* Go back to css/ and js/ folders as opposed to assets/

* Bundle embed.host.js and embed.content.js

* Add components folder to live reload paths

* Remove bundlemon

* Use mix assets task in Dockerfil

* Add assets setup to CONTRIBUTING.md
2023-11-01 16:27:29 +02:00
hq1 117eef000d
Upgrade Erlang/Elixir stack (#3454)
* Bump deps

* Bump stack

* Fix deprecation warnings

* Fix VCR cassettes mismatch due to OTP-18414

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>

* Format & fix flaky tests

* Handle raw IPv4 hostnames; test public suffix TLD

* Configure locus db cache_dir

So that maxmind unavailability doesn't affect
application startup. PERSISTENT_CACHE_DIR env var is used
to point locus at the GeoIP DB file.

* WIP: Remove ExVCR

* Fix test env config

* Fixup exvcr

* Remove exvcr from deps

* Add convert script

* Remove exvcr cassettes

* Remove convert script

* Rename test

* Update moduledoc

* Update dockerfile

* Bump CI cache

* Tag more slow tests, why not?

* Use charlist for locus cache option

* Pin nodejs

* Merge google tests, make them async

---------

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
2023-10-24 10:33:48 +02:00
hq1 cf4fee33c2
Pin alpine versions to 3.18.0 (#3057)
* Revert "Bump alpine from 3.18.0 to 3.18.2 (#3044)"

This reverts commit c19a51efb0.

* Pin both images to alpine 3.18.0
2023-06-20 07:09:42 +02:00
dependabot[bot] c19a51efb0
Bump alpine from 3.18.0 to 3.18.2 (#3044)
Bumps alpine from 3.18.0 to 3.18.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-16 17:15:40 +02:00
dependabot[bot] d437d17777
Bump alpine from 3.17.0 to 3.18.0 (#2910)
Bumps alpine from 3.17.0 to 3.18.0.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-11 13:54:58 +02:00
ruslandoga 885ccaa7ab
fix qemu arm64 builds (#2879)
* fix qemu arm64 builds

* unpin final image
2023-05-03 13:13:22 +02:00
Adam Rutkowski ecb552479f
Upgrade erlang/elixir/alpine stack (#2695)
* Dockerfile: pin elixir-1.14.3, erlang-25.2.3, alpine-3.17.0

* asdf: pin erlang 25.2.3, elixir 1.14.3-otp-25

* Remove nonsense

* Remove erlang dupe

* Remove erlang, it's in the base image already

* Remove empty file

* Truncate seconds in NaiveDateTime instances

* Bump cache key

* Mitigate Error:error:0308010C:digital envelope routines::unsupported

See: https://www.newline.co/@kchan/how-to-fix-the-error-errorerror0308010cdigital-envelope-routinesunsupported--0f8d3f17

* Upgrade to latest alpine image and pin to an exact digest

* Revert "Upgrade to latest alpine image and pin to an exact digest"

This reverts commit cdf6624efa.

* Pin alpine image to an exact digest

---------

Co-authored-by: Cenk Kücük <c@cenk.me>
2023-02-22 09:49:43 +01:00
Davy Landman 0026487fb5
Added certs to runtime container to enable SSL for SMTP (#2537) 2023-02-14 12:21:37 +02:00
Vinicius Brasil 3c8b71ea3c
Revert "Bump hexpm/elixir (#2239)" (#2332)
This reverts commit 76806a8924.
2022-10-13 11:38:59 -03:00
dependabot[bot] 76806a8924
Bump hexpm/elixir (#2239)
Bumps hexpm/elixir from 1.13.4-erlang-24.3.3-alpine-3.15.3 to 1.13.4-erlang-24.3.3-alpine-3.16.0.

---
updated-dependencies:
- dependency-name: hexpm/elixir
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-13 08:02:57 +02:00
ruslandoga bac3c3e4e5
lite geonames (#2214) 2022-10-04 10:54:24 +03:00
Uku Taht 054f7f7dbb Copy config before compilation in Dockerfile 2022-09-21 14:42:22 +03:00
Adam Rutkowski 1519db72c2
Clean up docker entrypoint script (#2217)
The .gitlab directory is no longer relevant.
This moves the entrypoint script to `rel/` directory
and copies from there.
2022-09-13 14:28:28 +03:00
Uku Taht b667d65d52 Move ARG to running container instead of build container 2022-05-27 15:24:11 +03:00
Uku Taht ed126bdb85 Use correct erlang version 2022-05-02 15:58:07 +03:00
Uku Taht e4816e8f64 Update Elixir version 2022-05-02 11:56:00 +03:00
Uku Taht 69576aa253 Default to 127.0.0.1 listen_ip on non-docker use-cases 2022-01-21 14:23:09 -06:00
Uku Taht 3fffd0c05d Add city overrides 2021-12-29 15:29:13 +02:00
Uku Taht 34dc955f09 Revert "Remove geonames file from Dockerfile"
This reverts commit c3178b25e0.
2021-12-29 11:58:22 +02:00
Uku Taht 6951e49cb4 Remove && 2021-12-23 14:53:00 +02:00
Uku Taht c3178b25e0 Remove geonames file from Dockerfile 2021-12-23 14:49:40 +02:00
Uku Taht 1dba113e2f
[Draft] Improve location translations (#1526)
* WIP

* Use location library for search suggestions

* Remove unused code

* Remove Countries completely

* Fix tests
2021-12-13 12:03:27 +02:00
Peter Dave Hello d272cd80d5
Prevent leaving apk cache in Docker image (#1440)
Use `--no-cache` with `apk upgrade` instead of additional `apk update`
2021-11-04 14:17:40 +02:00
Uku Taht 9f92cf779f Add libstdc and libgcc to alpine docker image 2021-09-09 12:14:53 +03:00
Uku Taht c68b88c24b
Upgrade otp (#1313)
* update tool versions to latest

* Upgrades erlang and elixir, format project

Co-authored-by: happysalada <raphael@megzari.com>
2021-09-09 11:17:24 +03:00
Uku Taht 1712302c73 Remove broken build step 2021-08-25 10:48:36 +03:00
Uku Taht a84429ba0f Update ref and ua databases 2021-08-23 11:41:43 +03:00
Uku Taht c2e233fac4 Remove npm audit 2021-05-12 13:07:55 +03:00
Uku Taht 7982c236c1 Better Sentry tracking 2021-04-23 11:56:41 +03:00