Compare commits

..

No commits in common. "e326a2026b865aca686ea6f18ab87e96a62b81b3" and "a666b2fbdd6035ff4e6d1daaa3a0725f49d03f02" have entirely different histories.

8 changed files with 1 additions and 122 deletions

View file

@ -2,7 +2,7 @@
title: "Etherpad"
favicon: "favicon.ico"
hostname: ":80"
database_password: "{{lookup('password', './.pass/etherpad_db_password')}}"
database_password: "{{lookup('password', './database_password')}}"
pad_options_lang: 'it-it'
plugins: ['ep_comments_page', 'ep_headings2', 'ep_markdown', 'ep_align', 'ep_page_view']

View file

@ -1,5 +0,0 @@
---
- name: "Install NGINX"
apt:
name: nginx
update_cache: yes

View file

@ -1,5 +0,0 @@
---
api_key: "{{lookup('password', './.pass/up1_api_key')}}"
maximum_file_size: 500000000
port: 31337
footer: <a href="https://github.com/Upload/Up1" target="_blank">Source Code</a> - <a href="mailto:info@cisti.org" id="contact" target="_blank">Contact</a>

View file

@ -1,15 +0,0 @@
---
dependencies:
# install nodejs
- role: nodejs
# install caddy and configure it as reverse proxy
- role: caddy
vars:
caddy_config: |
{{hostname}}
encode gzip
reverse_proxy /api/* 127.0.0.1:31337
root * /srv/up1/up1/client
file_server

View file

@ -1,53 +0,0 @@
---
- name: ensure lufi user is present
user:
name: "up1"
home: "/srv/up1"
shell: "/bin/bash"
state: present
- name: Clone up1 repo
git:
repo: https://github.com/Upload/Up1
dest: /srv/up1/up1
become: true
become_user: up1
- name: copy server settings
template:
src: server.conf.j2
dest: /srv/up1/up1/server/server.conf
owner: up1
group: up1
mode: 0600
- name: copy client settings
template:
src: config.js.j2
dest: /srv/up1/up1/client/config.js
owner: up1
group: up1
mode: 0600
- name: Install up1 deps
become: true
become_user: up1
npm:
path: /srv/up1/up1/server
- name: NODE | Install pm2
npm:
name: pm2
global: yes
production: yes
state: present
- name: NODE | Start APP
become: true
become_user: up1
shell: pm2 start server.js --name server
args:
chdir: /srv/up1/up1/server
ignore_errors: yes

View file

@ -1,4 +0,0 @@
upload.config.server = '' // Empty if the webapp is in the same place as the server
// upload.config.server = 'https://yourserver.com/' // If the webapp is separated from the server - remember the trailing slash
upload.config.api_key = '{{ api_key }}' // Should be the same as the server, used for uploading
upload.config.footer = '{{ footer }}'

View file

@ -1,29 +0,0 @@
{
"api_key": "{{ api_key }}",
"delete_key": "",
"maximum_file_size": {{ maximum_file_size }},
"path": {
"i": "../i",
"client": "../client"
},
"http": {
"enabled": true,
"listen": "127.0.0.1:{{ port }}"
},
"https": {
"enabled": false,
"listen": ":443",
"cert": "./cert.pem",
"key": "./key.pem"
},
"cloudflare-cache-invalidate": {
"enabled": false,
"token": "Cloudflare API token here",
"email": "Cloudflare login email here",
"domain": "Domain to invalidate cache on"
}
}

View file

@ -1,10 +0,0 @@
---
- name: "Testing up1 role"
hosts: localhost
become: true
roles:
- role: common
- role: up1
vars:
hostname: :8000