# HG changeset patch # User Luke Hoersten # Date 1545974830 18000 # Node ID 2b0d305daa43cbef6590a0a42516daf5cc29f1c1 # Parent 56531bbfd0742003262de404024bb78e521a1d28 Moved to prod config. diff -r 56531bbfd074 -r 2b0d305daa43 roles/pleroma/defaults/main.yaml --- a/roles/pleroma/defaults/main.yaml Thu Dec 27 23:53:13 2018 -0500 +++ b/roles/pleroma/defaults/main.yaml Fri Dec 28 00:27:10 2018 -0500 @@ -2,6 +2,7 @@ pleroma_user: "pleroma" pleroma_instance_name: "{{pleroma_host}}" +pleroma_desc: "A Pleroma fediverse instance." pleroma_host: "localhost" pleroma_scheme: "https" pleroma_port: 443 diff -r 56531bbfd074 -r 2b0d305daa43 roles/pleroma/tasks/main.yaml --- a/roles/pleroma/tasks/main.yaml Thu Dec 27 23:53:13 2018 -0500 +++ b/roles/pleroma/tasks/main.yaml Fri Dec 28 00:27:10 2018 -0500 @@ -45,7 +45,7 @@ become_user: "{{pleroma_user}}" with_items: - "setup_db.psql" - - "dev.secret.exs" + - "prod.secret.exs" notify: restart pleroma - name: install pleroma psql diff -r 56531bbfd074 -r 2b0d305daa43 roles/pleroma/templates/dev.secret.exs.j2 --- a/roles/pleroma/templates/dev.secret.exs.j2 Thu Dec 27 23:53:13 2018 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -use Mix.Config - -config :pleroma, Pleroma.Web.Endpoint, - url: [host: "{{pleroma_host}}", scheme: "{{pleroma_scheme}}", port: {{pleroma_port}}], - secret_key_base: "{{pleroma_secret_key}}" - -config :pleroma, :instance, - name: "{{pleroma_instance_name}}", - email: "{{pleroma_admin_email}}", - limit: {{pleroma_char_limit}}, - registrations_open: {{pleroma_signup_open}}, - dedupe_media: true - -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: "{{pleroma_user}}", - password: "{{pleroma_db_passwd}}", - database: "{{pleroma_user}}", - hostname: "{{pleroma_db_host}}", - pool_size: 10 diff -r 56531bbfd074 -r 2b0d305daa43 roles/pleroma/templates/pleroma.service.j2 --- a/roles/pleroma/templates/pleroma.service.j2 Thu Dec 27 23:53:13 2018 -0500 +++ b/roles/pleroma/templates/pleroma.service.j2 Fri Dec 28 00:27:10 2018 -0500 @@ -6,6 +6,7 @@ User={{pleroma_user}} WorkingDirectory=/home/{{pleroma_user}}/pleroma Environment="HOME=/home/{{pleroma_user}}" +Environment="MIX_ENV=prod" ExecStart=/usr/local/bin/mix phx.server ExecReload=/bin/kill $MAINPID KillMode=process diff -r 56531bbfd074 -r 2b0d305daa43 roles/pleroma/templates/prod.secret.exs.j2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roles/pleroma/templates/prod.secret.exs.j2 Fri Dec 28 00:27:10 2018 -0500 @@ -0,0 +1,27 @@ +use Mix.Config + +config :pleroma, Pleroma.Web.Endpoint, + url: [host: "{{pleroma_host}}", scheme: "{{pleroma_scheme}}", port: {{pleroma_port}}], + secret_key_base: "{{pleroma_secret_key}}" + +config :pleroma, :instance, + name: "{{pleroma_instance_name}}", + description: "{{pleroma_desc}}", + email: "{{pleroma_admin_email}}", + limit: {{pleroma_char_limit}}, + registrations_open: {{pleroma_signup_open}}, + dedupe_media: true + +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: "{{pleroma_user}}", + password: "{{pleroma_db_passwd}}", + database: "{{pleroma_user}}", + hostname: "{{pleroma_db_host}}", + pool_size: 10