Skip to content
Snippets Groups Projects
Unverified Commit 205e6372 authored by Nick Thomas's avatar Nick Thomas
Browse files

Add distillery for producing binary releases

parent 11a1241d
No related tags found
No related merge requests found
Pipeline #
......@@ -12,6 +12,7 @@ variables:
stages:
- lint
- test
- build
before_script:
- mix local.hex --force
......@@ -29,3 +30,13 @@ unit-testing:
stage: test
script:
- MIX_ENV=test mix test --trace
Debian Stretch:
stage: build
script:
- mix release.init
- cp config/prod.secret.exs.env.tmpl config/prod.secret.exs
- MIX_ENV=prod mix release
artifacts:
paths:
- _build/
use Mix.Config
config :pleroma, Pleroma.Web.Endpoint,
url: URI.parse(System.get_env("PLEROMA_WEB_URL")),
secret_key_base: System.get_env("PLEROMA_WEB_SECRET_KEY_BASE")
config :pleroma, :instance,
name: System.get_env("PLEROMA_INSTANCE_NAME"),
email: String.to_integer(System.get_env("PLEROMA_INSTANCE_EMAIL")),
limit: String.to_integer(System.get_env("PLEROMA_INSTANCE_LIMIT")),
registrations_open: String.to_existing_atom(System.get_env("PLEROMA_REGISTRATIONS_OPEN"))
config :pleroma, :media_proxy,
enabled: false,
redirect_on_failure: true
#base_url: "https://cache.pleroma.social"
# Configure your database
config :pleroma, Pleroma.Repo,
adapter: Ecto.Adapters.Postgres,
username: System.get_env("PLEROMA_DB_USERNAME"),
password: System.get_env("PLEROMA_DB_PASSWORD"),
database: System.get_env("PLEROMA_DB_DATABASE"),
hostname: System.get_env("PLEROMA_DB_HOSTNAME"),
pool_size: 10
......@@ -30,6 +30,7 @@ defmodule Pleroma.Mixfile do
# Type `mix help deps` for examples and options.
defp deps do
[
{:distillery, "~> 1.5", runtime: false},
{:phoenix, "~> 1.3.0"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.2"},
......
......@@ -12,6 +12,7 @@
"db_connection": {:hex, :db_connection, "1.1.3", "89b30ca1ef0a3b469b1c779579590688561d586694a3ce8792985d4d7e575a61", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: true]}], "hexpm"},
"decimal": {:hex, :decimal, "1.5.0", "b0433a36d0e2430e3d50291b1c65f53c37d56f83665b43d79963684865beab68", [:mix], [], "hexpm"},
"deppie": {:hex, :deppie, "1.1.0", "cfb6fcee7dfb64eb78cb8505537971a0805131899326ad469ef10df04520f451", [:mix], []},
"distillery": {:hex, :distillery, "1.5.2", "eec18b2d37b55b0bcb670cf2bcf64228ed38ce8b046bb30a9b636a6f5a4c0080", [:mix], [], "hexpm"},
"ecto": {:hex, :ecto, "2.2.10", "e7366dc82f48f8dd78fcbf3ab50985ceeb11cb3dc93435147c6e13f2cda0992e", [:mix], [{:db_connection, "~> 1.1", [hex: :db_connection, repo: "hexpm", optional: true]}, {:decimal, "~> 1.2", [hex: :decimal, repo: "hexpm", optional: false]}, {:mariaex, "~> 0.8.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.13.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: true]}], "hexpm"},
"elixir_make": {:hex, :elixir_make, "0.4.1", "6628b86053190a80b9072382bb9756a6c78624f208ec0ff22cb94c8977d80060", [:mix], [], "hexpm"},
"eternal": {:hex, :eternal, "1.2.0", "e2a6b6ce3b8c248f7dc31451aefca57e3bdf0e48d73ae5043229380a67614c41", [:mix], [], "hexpm"},
......
# Import all plugins from `rel/plugins`
# They can then be used by adding `plugin MyPlugin` to
# either an environment, or release definition, where
# `MyPlugin` is the name of the plugin module.
Path.join(["rel", "plugins", "*.exs"])
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
# This sets the default release built by `mix release`
default_release: :default,
# This sets the default environment used by `mix release`
default_environment: Mix.env()
# For a full list of config options for both releases
# and environments, visit https://hexdocs.pm/distillery/configuration.html
# You may define one or more environments in this file,
# an environment's settings will override those of a release
# when building in that environment, this combination of release
# and environment configuration is called a profile
environment :dev do
# If you are running Phoenix, you should make sure that
# server: true is set and the code reloader is disabled,
# even in dev mode.
# It is recommended that you build with MIX_ENV=prod and pass
# the --env flag to Distillery explicitly if you want to use
# dev mode.
set dev_mode: true
set include_erts: false
set cookie: :test
end
environment :prod do
set include_erts: true
set include_src: false
set cookie: :crypto.hash(:sha256, System.get_env("COOKIE")) |> Base.encode16 |> String.to_atom
end
# You may define one or more releases in this file.
# If you have not set a default release, or selected one
# when running `mix release`, the first release in the file
# will be used by default
release :pleroma do
set version: current_version(:pleroma)
set applications: [
:runtime_tools,
]
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment