diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-02-18 15:30:02 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-02-18 19:30:39 +0100 |
commit | 159df176f990fd1f819efcfd431677b78f367697 (patch) | |
tree | 51c7e2c7b2bafb475a07934caba6076490ecf29b /modules/role/templates | |
parent | 1dca26e507d12b9a38e8740e2c310c8bee4e173c (diff) | |
download | Puppet-159df176f990fd1f819efcfd431677b78f367697.tar.gz Puppet-159df176f990fd1f819efcfd431677b78f367697.tar.zst Puppet-159df176f990fd1f819efcfd431677b78f367697.zip |
Install and configure api and assets
Diffstat (limited to 'modules/role/templates')
3 files changed, 34 insertions, 0 deletions
diff --git a/modules/role/templates/cryptoportfolio/api_conf.toml.erb b/modules/role/templates/cryptoportfolio/api_conf.toml.erb new file mode 100644 index 0000000..13550c9 --- /dev/null +++ b/modules/role/templates/cryptoportfolio/api_conf.toml.erb | |||
@@ -0,0 +1,16 @@ | |||
1 | log_level="info" | ||
2 | mode="<%= @cf_env %>" | ||
3 | log_out="stdout" | ||
4 | |||
5 | [db] | ||
6 | user="<%= @cf_pg_user %>" | ||
7 | password="<%= @cf_pg_password %>" | ||
8 | database="<%= @cf_pg_db %>" | ||
9 | address="<%= @cf_pg_host %>" | ||
10 | |||
11 | [api] | ||
12 | domain="<%= @cf_front_app_host %>" | ||
13 | jwt_secret="<%= @cf_front_app_api_secret %>" | ||
14 | |||
15 | [app] | ||
16 | public_dir="../web/build/static" | ||
diff --git a/modules/role/templates/cryptoportfolio/cryptoportfolio-app.service.erb b/modules/role/templates/cryptoportfolio/cryptoportfolio-app.service.erb new file mode 100644 index 0000000..a521c0e --- /dev/null +++ b/modules/role/templates/cryptoportfolio/cryptoportfolio-app.service.erb | |||
@@ -0,0 +1,14 @@ | |||
1 | [Unit] | ||
2 | Description=Cryptoportfolio app | ||
3 | |||
4 | [Service] | ||
5 | Type=simple | ||
6 | |||
7 | WorkingDirectory=<%= @cf_front_app_api_workdir %> | ||
8 | User=<%= @cf_user %> | ||
9 | Group=<%= @cf_group %> | ||
10 | UMask=007 | ||
11 | |||
12 | ExecStart=<%= @cf_front_app_api_bin %> -conf <%= @cf_front_app_api_conf %> | ||
13 | |||
14 | Restart=on-failure | ||
diff --git a/modules/role/templates/cryptoportfolio/static_conf.env.erb b/modules/role/templates/cryptoportfolio/static_conf.env.erb new file mode 100644 index 0000000..db9759d --- /dev/null +++ b/modules/role/templates/cryptoportfolio/static_conf.env.erb | |||
@@ -0,0 +1,4 @@ | |||
1 | API_HOST="<%= @cf_front_app_host %>" | ||
2 | API_PORT="<%= @cf_front_app_port %>" | ||
3 | API_HTTPS="<%= @cf_front_app_ssl %>" | ||
4 | |||