Commit Graph

43 Commits

Author SHA1 Message Date
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
Uku Taht
4fd5cdff58 Add download step to docker build 2021-04-13 12:36:47 +03:00
Jake Howard
f6d34f3ff6
Expose port 8000 by default (#675)
This bind it to the host port by default, it's more a hint to tools which integrate with Docker directly.
2021-02-05 11:27:44 +02:00
Oliver Kriska
4d4f8ba5c3
Elixir & Docker upgrade (#566)
* Elixir upgrade

 - upgraded Elixir to 1.11.2
 - upgraded Erlang to 23.2.1
 - upgraded Phoenix to 1.5.7
 - Upgraded:
  bamboo_postmark 0.6.0 => 0.7.0 (minor)
  bcrypt_elixir 2.2.0 => 2.3.0
  csv 2.3.1 => 2.4.1
  ecto 3.4.6 => 3.5.5
  ecto_sql 3.4.4 => 3.5.3
  elixir_make 0.6.0 => 0.6.2
  ex_machina 2.4.0 => 2.5.0
  excoveralls 0.12.3 => 0.13.4 (minor)
  file_system 0.2.8 => 0.2.10
  gettext 0.18.0 => 0.18.2
  httpoison 1.6.2 => 1.7.0
  nanoid 2.0.2 => 2.0.5
  phoenix_ecto 4.1.0 => 4.2.1
  phoenix_live_reload 1.2.2 => 1.3.0
  postgrex 0.15.5 => 0.15.7
  sentry 7.2.4 => 7.2.5
  timex 3.6.2 => 3.6.3
  tzdata 1.0.3 => 1.0.5
  yamerl 0.8.0 => 0.8.1

* Elixir & Docker upgrade

upgraded to 1.11.3

* Docker

 - fixed missing python3 package for newer Alpine linux
2021-01-13 10:31:16 +02:00
Caleb Woodbine
a956d58a10
Slim container image and swap Debian for Alpine (#353) 2020-10-19 11:12:24 +03:00
Caleb Woodbine
f7235d4407
Run container as non root (#362) 2020-10-15 11:22:04 +03:00
Uku Taht
5e500fef59 Revert "Update container image to run as non root (#352)"
This reverts commit 59acd4c76d.
2020-10-14 15:59:19 +03:00
Caleb Woodbine
59acd4c76d
Update container image to run as non root (#352) 2020-10-13 10:20:02 +03:00
Kasper Seweryn
a99e7c4f94
Fix dockerfile 2020-10-06 15:37:59 +00:00
Uku Taht
ead4a7d560
Release selfhosted (#341)
* Optimize Dockerfile

* Update selfhosting documentation

* Remove unnecessary files

* Remove internal config stuff

* Update config

* WIP

* Use BASE_URL instead of HOST and SCHEME

* Add port to endpoint url config

* Make config/config.exs on par with config/releases.exs

* Add changelog entry

* Document configuration change
2020-10-05 15:01:54 +03:00
Uku Taht
4bd12f03fc
Reduce script size (#68)
* Remove cookie code

* Compile tracker separetly from website assets

* Install uglify

* Help minifier reduce varaibles
2020-05-29 09:51:16 +03:00
Chandra Tungathurthi
5eb8929929
Support for docker based self-hosting (#64)
* first commit with test and compile job

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* adding 'prepare' stage

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* updated ci script to include "test" compile phase

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* adding environment variables for connecting to postgresql

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* updated ci config for postgres

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* using non-alpine version of elixir

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* re-using the 'compile' artifacts and added explict env variables for testing

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* removing redundant deps fetching from common code

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* formatting using mix.format -- beware no-code changes!

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* added release config

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* adding consistent env variable for Database

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* more cleaning up of environment variables

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Adding releases config for enabling releases

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* cleaning up env configs

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Cleaned up config and prepared config for releases

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* updated CI script with new config for test

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Added Dockerfile for creating production docker image

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Adding "docker" build job yay!

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* using non-slim version of debian and installing webpack

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Adding overlays for migrations on releases

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* restricting the docker built to master branch only

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* typo fix

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* adding "Hosting.md" to explain hosting instructions

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* removed the default comments

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Added documentation related to env variables

* updated documentation and fixed typo

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* updated documentation

* Bumping up elixir version as `overlays` are only supported in latest version

read release notes: https://github.com/elixir-lang/elixir/releases/tag/v1.10.0

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Adding tarball assembly during release

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* updated HOSTING.md

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Added support for db migration

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* minor corrections

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* initializing admin user

Admin user has been added in the "migration" phase. A default user is automatically created in the process. One can provide the related env variables, else a new one will be automatically created for you.

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Initial base domain update - phase#1

These changes are only meant for correct operating it under self-hosting. There are many other cosmetic changes, that require updates to email, site and other places where the original website and author is used.

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Using dedicated config variable `base_domain` instead

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* adding base_domain to releases config

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* removing the dedicated config "base_domain", relying on endpoint host

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Removed the usage of "Mix" in code!

It is bad practice to use "mix" module inside the code as in actual release this module is unavailable. Replacing this with a config environment variable

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Added support for SMTP via Bamboo Smtp Adapter

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Capturing SMTP errors via Sentry

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Minor updates

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* Adding junit formatter -- useful for generating test reports

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* adding documentation for default user

* Resolve "Gitlab Adoption: Add supported services in "Security & Compliance""

* bumping up the debian version to fix issues

fixing some vulnerabilities identified by the scanning tools

* More updates for self-hosting

Changes in most of the places to suit self-hosting. Although, there are some which have been left-off.

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* quick-dirty-fix!

* bumping up the db connect timeout

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* bumping up the db connect timeout

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* bumping up the db connect timeout

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* bumping up timeout - skipping MRs :-/

* removing restrictions on watching for changes

this stuff isn't working

* Update HOSTING.md

* renamed the module name

* reverting formatting-whitespace changes

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* reverting the name to release

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* adding docker-compose.yml and related instructions

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* using `plausible_url` instead of assuming `https`

this is because, it is much to test in local dev machines and in most cases there's already a layer above which is capable for `https` termination and http -> https upgrade

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* WIP: merging changes from upstream

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* wip: more changes

* Pushing in changes from upstream

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* changes to ci for testing

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* cleaning up and finishing clickhouse integration

Signed-off-by: Chandra Tungathurthi <tckb@tgrthi.me>

* updating readme with hosting details
2020-05-26 16:09:34 +03:00