hbin / mina-nginx Goto Github PK
View Code? Open in Web Editor NEWMina tasks for handle with Nginx.
License: MIT License
Mina tasks for handle with Nginx.
License: MIT License
such as mina nginx:reload
, mina nginx:stop
actions, they need input the password to run, but it never prompt, just hanging;
if I add set :execution_mode, :system
to the deploy file, these actions works well;but when I run mina nginx:print
, it reports errors
mina nginx:print
sh: line 39: echo "-----> Loading rbenv"
export RBENV_ROOT="$HOME/.rbenv"
export PATH="$HOME/.rbenv/bin:$PATH"
if ! which rbenv >/dev/null; then
echo "! rbenv not found"
echo "! If rbenv is installed, check your :rbenv_path setting."
exit 1
fi
eval "$(rbenv init -)"
echo '
upstream koob {
server unix:///home/deploy/site/koob/shared/tmp/puma.sock fail_timeout=0;
}
server {
listen 80 default deferred;
server_name kbook.wenghuaedu.com
root /home/deploy/site/koob/current/public;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @koob;
location @koob {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://koob;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
': No such file or directory
! Run Error
what's wrong with my config?
mina-nginx was resolved to 0.0.3, which depends on
mina (~> 1)
Hi @hbin โ needed to implement nginx in mina for a project I'm working on and stumbled on your repo. I like your work; it was minimal, flexible, and easy to read.
Made a couple changes while dealing with plugin issues to further satisfy our flow. Will be publishing them shortly; let me know if you'd like a PR back into the project. TL;DR:
nginx:install
task, which copies the template to the user's repo's lib/mina/templates
dir;server_name
fall back to domain
if not set;:parse
& :link
tasks in favor of a comprehensive install in :setup
:print
task, to satisfy the preview functions parse
was helpful for (runs locally)Lmk if a PR makes sense? Also, any thoughts on :install
vs. :init
for the new task name?
All *_path variables (:current_path, :shared_path, ...) now include :deploy_to, so the template should not fetch :current_path to set root
-root <%= "#{fetch :deploy_to}/#{fetch :current_path}/public" %>;
+root <%= "#{fetch :current_path}/public" %>;
It seems that the current published Gem 0.0.3 is not compatible with Mina >= 1.0.
Could you merge the changes from https://github.com/huobazi/mina-nginx and publish a new version?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.