Browse Source

First version

master
Dennis Schwerdel 5 years ago
commit
7708a21c28
  1. 4
      .dockerignore
  2. 2
      .gitignore
  3. 2
      CHANGELOG
  4. 23
      CloudronManifest.json
  5. 5
      DESCRIPTION.md
  6. 20
      Dockerfile
  7. 43
      README.md
  8. 14
      fpm.conf
  9. BIN
      logo.png
  10. 54
      nginx.conf
  11. 5
      page/bootstrap.min.css
  12. 21
      page/index.html
  13. BIN
      page/logo.png
  14. 27
      page/style.css
  15. 16
      start.sh

4
.dockerignore

@ -0,0 +1,4 @@
test/*
.git/*
screenshots/*

2
.gitignore

@ -0,0 +1,2 @@
node_modules/

2
CHANGELOG

@ -0,0 +1,2 @@
[0.1.0]
* First version

23
CloudronManifest.json

@ -0,0 +1,23 @@
{
"id": "org.nginx.cloudronapp",
"title": "Nginx",
"author": "Nginx developers",
"description": "file://DESCRIPTION.md",
"tagline": "Nginx webserver",
"tags": [
"webserver"
],
"version": "0.1.0",
"healthCheckPath": "/",
"httpPort": 8000,
"manifestVersion": 1,
"website": "https://nginx.org",
"contactEmail": "support@cloudron.io",
"icon": "logo.png",
"addons": {
"localstorage": {}
},
"mediaLinks": [
],
"changelog": "file://CHANGELOG"
}

5
DESCRIPTION.md

@ -0,0 +1,5 @@
### Empty Website with Nginx + PHP.
Use `cloudron push` to copy files into `/app/data/page/` and `cloudron exec` to get a remote terminal.
Edit `/app/data/nginx.conf` to change the webserver configuration according to the [Nginx Documentation](https://nginx.org/en/docs/).

20
Dockerfile

@ -0,0 +1,20 @@
FROM cloudron/base:0.9.0
MAINTAINER Dennis Schwerdel <schwerdel@googlemail.com>
RUN mkdir -p /app/code
WORKDIR /app/code
ADD nginx.conf /app/code/nginx.conf.default
ADD page /app/code/page.default
ADD fpm.conf /etc/php/7.0/fpm/php-fpm.conf
ADD start.sh /app/code/start.sh
RUN mkdir /run/nginx && \
ln -s /dev/stderr /var/log/nginx/error.log && \
ln -s /dev/stdout /var/log/nginx/access.log && \
rmdir /var/lib/nginx && ln -s /tmp /var/lib/nginx
RUN chown -R cloudron:cloudron /app/code /run/nginx
CMD [ "/app/code/start.sh" ]

43
README.md

@ -0,0 +1,43 @@
# TinyTinyRSS Cloudron App
This repository contains the Cloudron app package source for [TinyTinyRSS](https://tt-rss.org/).
## Installation
[![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=org.tt_rss.cloudronapp)
or using the [Cloudron command line tooling](https://cloudron.io/references/cli.html)
```
cloudron install --appstore-id org.tt_rss.cloudronapp
```
## Building
The app package can be built using the [Cloudron command line tooling](https://cloudron.io/references/cli.html).
```
cd tinytinyrss-app
cloudron build
cloudron install
```
## Notes
* tt-rss now uses a rolling release model
* tt-rss themes require a fixed version header at the top of the theme's css.
See includes/version.php in tt-rss code base (VERSION_STATIC).
## Testing
The e2e tests are located in the `test/` folder and require [nodejs](http://nodejs.org/). They are creating a fresh build, install the app on your Cloudron, perform tests, backup, restore and test if things are ok.
```
cd tinytinyrss-app/test
npm install
USERNAME=<cloudron username> PASSWORD=<cloudron password> mocha --bail test.js
```

14
fpm.conf

@ -0,0 +1,14 @@
[global]
error_log = /dev/stderr
[www]
listen = /var/run/php-fpm.sock
listen.mode = 0666
user = cloudron
group = cloudron
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

BIN
logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

54
nginx.conf

@ -0,0 +1,54 @@
user cloudron;
worker_processes 1;
error_log /dev/stderr;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8000;
root /app/data/page;
index index.php index.html index.htm;
client_max_body_size 10m;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
fastcgi_param REMOTE_ADDR $http_x_real_ip;
}
location ~ /\.ht {
deny all;
}
}
}

5
page/bootstrap.min.css

File diff suppressed because one or more lines are too long

21
page/index.html

@ -0,0 +1,21 @@
<html>
<head>
<title> Nginx </title>
<link rel="stylesheet" href="bootstrap.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<div class="content">
<img src="logo.png" width="200px"/>
<h1> Nginx </h1>
<p>To get started, push some files to <tt>/app/data/page</tt> or edit <tt>/app/data/nginx.conf</tt>.</p>
<br/>
</div>
</div>
</body>
</html>

BIN
page/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

27
page/style.css

@ -0,0 +1,27 @@
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
.wrapper {
display: table;
width: 100%;
height: 100%;
}
.content {
display: table-cell;
width: 100%;
height: 100%;
text-align: center;
vertical-align: middle;
}
pre {
margin: auto;
text-align: left;
width: 400px;
}

16
start.sh

@ -0,0 +1,16 @@
#!/bin/bash
set -eu
if ! [ -e "/app/data/nginx.conf" ]; then
cp -a "/app/code/nginx.conf.default" "/app/data/nginx.conf"
fi
if ! [ -e "/app/data/page" ]; then
cp -a "/app/code/page.default" "/app/data/page"
fi
chown -R cloudron:cloudron /app/data
/usr/sbin/php-fpm7.0 &
exec /usr/sbin/nginx -c /app/data/nginx.conf -g 'daemon off;'
Loading…
Cancel
Save