mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
added generate the release env to pleroma.instance gen
This commit is contained in:
parent
595da6080d
commit
cf53e300f8
3 changed files with 13 additions and 4 deletions
|
@ -40,3 +40,4 @@ If any of the options are left unspecified, you will be prompted interactively.
|
|||
- `--strip-uploads <Y|N>` - use ExifTool to strip uploads of sensitive location data
|
||||
- `--anonymize-uploads <Y|N>` - randomize uploaded filenames
|
||||
- `--dedupe-uploads <Y|N>` - store files based on their hash to reduce data storage requirements if duplicates are uploaded with different filenames
|
||||
- `--skip-release-env` - skip generation the release environment file
|
||||
|
|
|
@ -101,9 +101,6 @@ sudo -Hu pleroma mix deps.get
|
|||
mv config/{generated_config.exs,prod.secret.exs}
|
||||
```
|
||||
|
||||
* Generate the environment file: `sudo -Hu pleroma mix pleroma.release_env gen`
|
||||
* Input path to env file or keep default value `./config/pleroma.env`
|
||||
|
||||
|
||||
* The previous command creates also the file `config/setup_db.psql`, with which you can create the database:
|
||||
|
||||
|
|
|
@ -36,7 +36,8 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
|||
listen_port: :string,
|
||||
strip_uploads: :string,
|
||||
anonymize_uploads: :string,
|
||||
dedupe_uploads: :string
|
||||
dedupe_uploads: :string,
|
||||
skip_release_env: :boolean
|
||||
],
|
||||
aliases: [
|
||||
o: :output,
|
||||
|
@ -241,6 +242,16 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
|||
|
||||
write_robots_txt(static_dir, indexable, template_dir)
|
||||
|
||||
if Keyword.get(options, :skip_release_env, false) do
|
||||
shell_info("""
|
||||
Release environment file is skip. Please generate the release env file before start.
|
||||
`MIX_ENV=#{Mix.env()} mix pleroma.release_env gen`
|
||||
""")
|
||||
else
|
||||
shell_info("Generation the environment file:")
|
||||
Mix.Tasks.Pleroma.ReleaseEnv.run(["gen"])
|
||||
end
|
||||
|
||||
shell_info(
|
||||
"\n All files successfully written! Refer to the installation instructions for your platform for next steps."
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue