Moved to prod config.
authorLuke Hoersten <luke@hoersten.org>
Fri, 28 Dec 2018 00:27:10 -0500
changeset 64 2b0d305daa43
parent 63 56531bbfd074
child 65 4538ad030906
Moved to prod config.
roles/pleroma/defaults/main.yaml
roles/pleroma/tasks/main.yaml
roles/pleroma/templates/dev.secret.exs.j2
roles/pleroma/templates/pleroma.service.j2
roles/pleroma/templates/prod.secret.exs.j2
--- 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
--- 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
--- 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
--- 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
--- /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