Skip to content

Commit

Permalink
update typecho
Browse files Browse the repository at this point in the history
  • Loading branch information
anycodes committed Dec 8, 2021
1 parent 5965c6f commit b0794f8
Show file tree
Hide file tree
Showing 148 changed files with 35,078 additions and 178 deletions.
140 changes: 1 addition & 139 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,141 +1,3 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/


.idea
.DS_Store
c
.s
node_modules

web-framework/php/laravel/src/code/root

!web-framework/php/wordpress/src/code/root/*
!web-framework/php/wordpress/src/code/root/usr/*
!web-framework/php/zblog/src/code/root/*
!web-framework/php/zblog/src/code/root/usr/*
.s
2 changes: 1 addition & 1 deletion web-framework/php/typecho/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Type: Application
Name: start-typecho
Provider:
- 阿里云
Version: 0.1.1
Version: 0.1.2
Description: 快速部署一个 Typecho 框架到阿里云函数计算
HomePage: https://github.com/devsapp/start-web-framework
Tags:
Expand Down
2 changes: 0 additions & 2 deletions web-framework/php/typecho/src/code/.fcignore

This file was deleted.

31 changes: 0 additions & 31 deletions web-framework/php/typecho/src/code/bootstrap

This file was deleted.

28 changes: 28 additions & 0 deletions web-framework/php/typecho/src/code/typecho/scripts/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -e

echo "Initilizing..."
whoami

cp /mnt/auto/typecho/typecho.conf /etc/nginx/sites-enabled/
chmod 777 -R /mnt/auto

echo "start nginx"
nohup nginx -c /etc/nginx/nginx.conf &

echo "start php-fpm"
php-fpm -c /usr/local/etc/php/php.ini-production -y /usr/local/etc/php-fpm.conf

while true
do
nginx_server=`ps aux | grep nginx | grep -v grep`
if [ ! "$nginx_server" ]; then
echo "restart nginx ..."
nginx -c /etc/nginx/nginx.conf
fi
php_fpm_server=`ps aux | grep php-fpm | grep -v grep`
if [ ! "$php_fpm_server" ]; then
echo "restart php-fpm ..."
nohup php-fpm -c /usr/local/etc/php/php.ini-production -y /usr/local/etc/php-fpm.conf &
fi
done
28 changes: 28 additions & 0 deletions web-framework/php/typecho/src/code/typecho/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -e

echo "Initilizing..."
whoami

cp /mnt/auto/typecho/typecho.conf /etc/nginx/sites-enabled/
chmod 777 -R /mnt/auto

echo "start nginx"
nohup nginx -c /etc/nginx/nginx.conf &

echo "start php-fpm"
php-fpm -c /usr/local/etc/php/php.ini-production -y /usr/local/etc/php-fpm.conf

while true
do
nginx_server=`ps aux | grep nginx | grep -v grep`
if [ ! "$nginx_server" ]; then
echo "restart nginx ..."
nginx -c /etc/nginx/nginx.conf
fi
php_fpm_server=`ps aux | grep php-fpm | grep -v grep`
if [ ! "$php_fpm_server" ]; then
echo "restart php-fpm ..."
nohup php-fpm -c /usr/local/etc/php/php.ini-production -y /usr/local/etc/php-fpm.conf &
fi
done
19 changes: 19 additions & 0 deletions web-framework/php/typecho/src/code/typecho/typecho.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
server {
listen 8080;
root /mnt/auto/typecho;
index index.php index.html index.htm;
# server_name localhost;
server_name *.fc.devsapp.cn;

client_max_body_size 100M;

location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
Loading

0 comments on commit b0794f8

Please sign in to comment.