master
Dennis Schwerdel 2017-05-04 18:27:37 +02:00
parent 7708a21c28
commit d4206eb4ee
13 changed files with 52 additions and 57 deletions

View File

@ -1,2 +1,5 @@
[0.1.0] [0.1.0]
* First version * First version
[0.1.1]
* Updated to base image 0.10.0

View File

@ -7,7 +7,7 @@
"tags": [ "tags": [
"webserver" "webserver"
], ],
"version": "0.1.0", "version": "0.1.1",
"healthCheckPath": "/", "healthCheckPath": "/",
"httpPort": 8000, "httpPort": 8000,
"manifestVersion": 1, "manifestVersion": 1,
@ -18,6 +18,8 @@
"localstorage": {} "localstorage": {}
}, },
"mediaLinks": [ "mediaLinks": [
"https://nginx.org/nginx.png"
], ],
"changelog": "file://CHANGELOG" "changelog": "file://CHANGELOG",
"postInstallMessage": "file://POSTINSTALL.md"
} }

View File

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

View File

@ -1,15 +1,16 @@
FROM cloudron/base:0.9.0 FROM cloudron/base:0.10.0
MAINTAINER Dennis Schwerdel <schwerdel@googlemail.com> MAINTAINER Dennis Schwerdel <schwerdel@googlemail.com>
RUN mkdir -p /app/code RUN mkdir -p /app/code
WORKDIR /app/code WORKDIR /app/code
ADD nginx.conf /app/code/nginx.conf.default ADD nginx.conf /app/code/nginx.conf.default
ADD page /app/code/page.default ADD public /app/code/public.default
ADD fpm.conf /etc/php/7.0/fpm/php-fpm.conf ADD fpm.conf /etc/php/7.0/fpm/php-fpm.conf
ADD start.sh /app/code/start.sh ADD start.sh /app/code/start.sh
RUN mkdir /run/nginx && \ RUN mkdir /run/nginx && \
rm /var/log/nginx/*.log && \
ln -s /dev/stderr /var/log/nginx/error.log && \ ln -s /dev/stderr /var/log/nginx/error.log && \
ln -s /dev/stdout /var/log/nginx/access.log && \ ln -s /dev/stdout /var/log/nginx/access.log && \
rmdir /var/lib/nginx && ln -s /tmp /var/lib/nginx rmdir /var/lib/nginx && ln -s /tmp /var/lib/nginx

5
POSTINSTALL.md Normal file
View File

@ -0,0 +1,5 @@
### Empty Website with Nginx + PHP.
Use `cloudron push` to copy files into `/app/data/public/` 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/).

View File

@ -1,15 +1,15 @@
# TinyTinyRSS Cloudron App # Nginx Cloudron App
This repository contains the Cloudron app package source for [TinyTinyRSS](https://tt-rss.org/). This repository contains the Cloudron app package source for Nginx.
## Installation ## Installation
[![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=org.tt_rss.cloudronapp) [![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=org.nginx.cloudronapp)
or using the [Cloudron command line tooling](https://cloudron.io/references/cli.html) or using the [Cloudron command line tooling](https://cloudron.io/references/cli.html)
``` ```
cloudron install --appstore-id org.tt_rss.cloudronapp cloudron install --appstore-id org.nginx.cloudronapp
``` ```
## Building ## Building
@ -17,27 +17,8 @@ cloudron install --appstore-id org.tt_rss.cloudronapp
The app package can be built using the [Cloudron command line tooling](https://cloudron.io/references/cli.html). The app package can be built using the [Cloudron command line tooling](https://cloudron.io/references/cli.html).
``` ```
cd tinytinyrss-app cd nginx-app
cloudron build cloudron build
cloudron install 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
```

BIN
medialinks/medialink_0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -17,35 +17,38 @@ http {
server { server {
listen 8000; listen 8000;
root /app/data/page; root /app/data/public;
index index.php index.html index.htm; index index.php index.html index.htm;
client_max_body_size 10m; # Uncomment to add a redirect
#return 302 $scheme://WWW.REDIRECT.TO.COM$request_uri;
location ~ \.php$ { # Uncomment to enable PHP
try_files $uri =404; #location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm.sock; # try_files $uri =404;
fastcgi_index index.php; # fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_param GATEWAY_INTERFACE CGI/1.1; # fastcgi_index index.php;
fastcgi_param SERVER_SOFTWARE nginx; # fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param QUERY_STRING $query_string; # fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REQUEST_METHOD $request_method; # fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type; # fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_LENGTH $content_length; # fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name; # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri; # fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param DOCUMENT_URI $document_uri; # fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_ROOT $document_root; # fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param SERVER_PROTOCOL $server_protocol; # fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param REMOTE_PORT $remote_port; # fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SERVER_ADDR $server_addr; # fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_PORT $server_port; # fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_NAME $server_name; # fastcgi_param SERVER_PORT $server_port;
fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on; # fastcgi_param SERVER_NAME $server_name;
fastcgi_param REMOTE_ADDR $http_x_real_ip; # fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
} # fastcgi_param REMOTE_ADDR $http_x_real_ip;
#}
# Disallow .htaccess .htpasswd etc.
location ~ /\.ht { location ~ /\.ht {
deny all; deny all;
} }

View File

@ -12,7 +12,7 @@
<div class="content"> <div class="content">
<img src="logo.png" width="200px"/> <img src="logo.png" width="200px"/>
<h1> Nginx </h1> <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> <p>To get started, push some files to <tt>/app/data/public</tt> or edit <tt>/app/data/nginx.conf</tt>.</p>
<br/> <br/>
</div> </div>
</div> </div>

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -6,8 +6,8 @@ if ! [ -e "/app/data/nginx.conf" ]; then
cp -a "/app/code/nginx.conf.default" "/app/data/nginx.conf" cp -a "/app/code/nginx.conf.default" "/app/data/nginx.conf"
fi fi
if ! [ -e "/app/data/page" ]; then if ! [ -e "/app/data/public" ]; then
cp -a "/app/code/page.default" "/app/data/page" cp -a "/app/code/public.default" "/app/data/public"
fi fi
chown -R cloudron:cloudron /app/data chown -R cloudron:cloudron /app/data