Populate /var/lib/mobilizon and update config.exs accordingly
This commit is contained in:
parent
8578fd0a73
commit
0bd8396b23
24
debian/config.exs.tpl
vendored
24
debian/config.exs.tpl
vendored
@ -33,3 +33,27 @@ config :mobilizon, Mobilizon.Storage.Repo,
|
|||||||
hostname: "__DB_HOST__",
|
hostname: "__DB_HOST__",
|
||||||
port: "5432",
|
port: "5432",
|
||||||
pool_size: 10
|
pool_size: 10
|
||||||
|
|
||||||
|
config :geolix,
|
||||||
|
databases: [
|
||||||
|
%{
|
||||||
|
id: :city,
|
||||||
|
adapter: Geolix.Adapter.MMDB2,
|
||||||
|
source: "/var/lib/mobilizon/geo_db/GeoLite2-City.mmdb"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
config :mobilizon, Mobilizon.Web.Upload.Uploader.Local,
|
||||||
|
uploads: System.get_env("MOBILIZON_UPLOADS", "/var/lib/mobilizon/uploads")
|
||||||
|
|
||||||
|
config :mobilizon, :exports,
|
||||||
|
path: System.get_env("MOBILIZON_UPLOADS_EXPORTS", "/var/lib/mobilizon/uploads/exports"),
|
||||||
|
formats: [
|
||||||
|
Mobilizon.Service.Export.Participants.CSV,
|
||||||
|
Mobilizon.Service.Export.Participants.PDF,
|
||||||
|
Mobilizon.Service.Export.Participants.ODS
|
||||||
|
]
|
||||||
|
|
||||||
|
config :tz_world,
|
||||||
|
data_dir: System.get_env("MOBILIZON_TIMEZONES_DIR", "/var/lib/mobilizon/timezones")
|
||||||
|
config :tzdata, :data_dir, System.get_env("MOBILIZON_TZDATA_DIR", "/var/lib/mobilizon/tzdata")
|
||||||
|
8
debian/dirs
vendored
8
debian/dirs
vendored
@ -1,3 +1,11 @@
|
|||||||
etc/mobilizon
|
etc/mobilizon
|
||||||
usr/share/mobilizon
|
usr/share/mobilizon
|
||||||
var/lib/mobilizon
|
var/lib/mobilizon
|
||||||
|
var/lib/mobilizon/geo_db
|
||||||
|
var/lib/mobilizon/sitemap
|
||||||
|
var/lib/mobilizon/timezones
|
||||||
|
var/lib/mobilizon/tzdata
|
||||||
|
var/lib/mobilizon/uploads
|
||||||
|
var/lib/mobilizon/uploads/csv
|
||||||
|
var/lib/mobilizon/uploads/pdf
|
||||||
|
var/lib/mobilizon/uploads/ods
|
||||||
|
7
debian/postinst
vendored
7
debian/postinst
vendored
@ -48,6 +48,13 @@ case "$1" in
|
|||||||
mv /etc/mobilizon/config.exs.tmp /etc/mobilizon/config.exs
|
mv /etc/mobilizon/config.exs.tmp /etc/mobilizon/config.exs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set permissions
|
||||||
|
chown -R mobilizon: /var/lib/mobilizon/geo_db
|
||||||
|
chown -R mobilizon: /var/lib/mobilizon/sitemap
|
||||||
|
chown -R mobilizon: /var/lib/mobilizon/timezones
|
||||||
|
chown -R mobilizon: /var/lib/mobilizon/tzdata
|
||||||
|
chown -R mobilizon: /var/lib/mobilizon/uploads
|
||||||
|
|
||||||
# Initialize/update database schema
|
# Initialize/update database schema
|
||||||
/usr/bin/mobilizon_ctl migrate
|
/usr/bin/mobilizon_ctl migrate
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user