Compare commits
11 Commits
5c1c94bfe2
...
uvicorn
| Author | SHA1 | Date | |
|---|---|---|---|
| 2695d1f759 | |||
| 3cb9b6e925 | |||
| 4e0c2dbfc4 | |||
| 3faf8a698a | |||
| f3b9303754 | |||
| 0e1bd3246d | |||
| 184fc3dc2d | |||
| 2db44cb74e | |||
| e17103f4ab | |||
| e59e976cd9 | |||
| 33a0756530 |
@ -22,6 +22,9 @@ WORKSPACE_NODE_VERSION=lts/hydrogen
|
|||||||
WORKSPACE_PHP_OPT_MAX_EXECUTION_TIME=0
|
WORKSPACE_PHP_OPT_MAX_EXECUTION_TIME=0
|
||||||
WORKSPACE_PHP_OPT_MEMORY_LIMIT=-1
|
WORKSPACE_PHP_OPT_MEMORY_LIMIT=-1
|
||||||
|
|
||||||
|
WORKSPACE_INSTALL_SUPERVISOR=false
|
||||||
|
WORKSPACE_INSTALL_PYTHON=false
|
||||||
|
|
||||||
### PHP-FPM #############################################
|
### PHP-FPM #############################################
|
||||||
PHP_OPT_SHORT_OPEN_TAG=Off
|
PHP_OPT_SHORT_OPEN_TAG=Off
|
||||||
PHP_OPT_MAX_EXECUTION_TIME=600
|
PHP_OPT_MAX_EXECUTION_TIME=600
|
||||||
|
|||||||
6
bash/nginx-ssl-gen.sh
Normal file
6
bash/nginx-ssl-gen.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||||
|
|
||||||
|
cd ${DIR}/config/nginx/ssl.d && \
|
||||||
|
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj \
|
||||||
|
"/C=XX/ST=RU/L=RU/O=WPS/OU=Dev/CN=test"
|
||||||
3
config/mariadb/90-mysqld.cnf.example
Normal file
3
config/mariadb/90-mysqld.cnf.example
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[mysqld]
|
||||||
|
explicit_defaults_for_timestamp = ON
|
||||||
|
default_time_zone = '+03:00'
|
||||||
3
config/mariadb/root-account.cnf.example
Normal file
3
config/mariadb/root-account.cnf.example
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[client]
|
||||||
|
user = root
|
||||||
|
password = 123456
|
||||||
@ -35,6 +35,7 @@ server {
|
|||||||
include includes.d/octobercms.conf;
|
include includes.d/octobercms.conf;
|
||||||
include includes.d/staticfiles.conf;
|
include includes.d/staticfiles.conf;
|
||||||
client_max_body_size 300M;
|
client_max_body_size 300M;
|
||||||
|
large_client_header_buffers 4 32k;
|
||||||
location ~ ^/index.php {
|
location ~ ^/index.php {
|
||||||
fastcgi_pass php81;
|
fastcgi_pass php81;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
|||||||
18
config/nginx/conf.d/z-directus.conf.example
Normal file
18
config/nginx/conf.d/z-directus.conf.example
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
map $http_host $directus {
|
||||||
|
directus-mi.local.wpstudio.ru directus-mi;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name
|
||||||
|
directus-mi.local.wpstudio.ru
|
||||||
|
;
|
||||||
|
location / {
|
||||||
|
resolver 127.0.0.11;
|
||||||
|
proxy_pass http://$directus:8055;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -16,5 +16,8 @@ server {
|
|||||||
proxy_set_header Connection 'upgrade';
|
proxy_set_header Connection 'upgrade';
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_cache_bypass $http_upgrade;
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
proxy_buffer_size 16k;
|
||||||
|
proxy_buffers 8 16k;
|
||||||
|
proxy_busy_buffers_size 32k;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
32
config/nginx/conf.d/z-python.conf.example
Normal file
32
config/nginx/conf.d/z-python.conf.example
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
map $http_host $python_upstream {
|
||||||
|
someproject.local.wpstudio.ru http://workspace74:8000;
|
||||||
|
}
|
||||||
|
|
||||||
|
map $http_host $python_root {
|
||||||
|
someproject.local.wpstudio.ru /usr/share/nginx/python/someproject;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name
|
||||||
|
someproject.local.wpstudio.ru
|
||||||
|
;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
resolver 127.0.0.11;
|
||||||
|
proxy_pass $python_upstream;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
|
||||||
|
root $python_root;
|
||||||
|
|
||||||
|
location ~ /media {
|
||||||
|
expires max;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /static {
|
||||||
|
expires max;
|
||||||
|
}
|
||||||
|
}
|
||||||
14
config/nginx/includes.d/https.conf
Normal file
14
config/nginx/includes.d/https.conf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
error_page 419 = @https;
|
||||||
|
set $is_https "0";
|
||||||
|
if ( $scheme ~* "^https") {
|
||||||
|
set $is_https "${is_https}1";
|
||||||
|
}
|
||||||
|
if ( $request_uri ~* "api/v") {
|
||||||
|
set $is_https "${is_https}1";
|
||||||
|
}
|
||||||
|
if ( $is_https = "0" ) {
|
||||||
|
return 419;
|
||||||
|
}
|
||||||
|
location @https {
|
||||||
|
rewrite ^ https://$http_host$request_uri permanent;
|
||||||
|
}
|
||||||
@ -1,47 +1,56 @@
|
|||||||
|
location / {
|
||||||
|
rewrite ^/.*$ /index.php last;
|
||||||
|
}
|
||||||
|
location ~ ^/combine.*\.(css|js) {
|
||||||
|
rewrite ^/.*$ /index.php last;
|
||||||
|
expires max;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
# Whitelist
|
||||||
rewrite ^/.*$ /index.php last;
|
|
||||||
}
|
|
||||||
location ~ ^/combine.*\.(css|js) {
|
|
||||||
rewrite ^/.*$ /index.php last;
|
|
||||||
expires max;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Whitelist
|
## Let October handle if static file not exists
|
||||||
## Let October handle if static file not exists
|
|
||||||
location = /favicon.ico { try_files $uri /index.php; }
|
|
||||||
location ~ ^/.*\.xml { try_files $uri /index.php; }
|
|
||||||
location = /robots.txt { try_files $uri /index.php; }
|
|
||||||
location = /humans.txt { try_files $uri /index.php; }
|
|
||||||
|
|
||||||
## Let nginx return 404 if static file not exists
|
location = /favicon.ico { try_files $uri /index.php; }
|
||||||
location /storage/app/uploads/public { try_files $uri /404; }
|
location ~ ^/.*\.xml { try_files $uri /index.php; }
|
||||||
location /storage/app/media { try_files $uri /404; }
|
location = /robots.txt { try_files $uri /index.php; }
|
||||||
location /storage/app/yml { try_files $uri /404; }
|
location = /humans.txt { try_files $uri /index.php; }
|
||||||
location /storage/app/docx { try_files $uri /404; }
|
|
||||||
location /storage/app/resized { try_files $uri /404; }
|
|
||||||
location /storage/temp/public { try_files $uri /404; }
|
|
||||||
|
|
||||||
location ~ ^/modules/.*/assets { try_files $uri /404; }
|
## Let nginx return 404 if static file not exists
|
||||||
location ~ ^/modules/.*/resources { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/behaviors/.*/assets { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/behaviors/.*/resources { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/widgets/.*/assets { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/widgets/.*/resources { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/formwidgets/.*/assets { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/formwidgets/.*/resources { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/reportwidgets/.*/assets { try_files $uri /404; }
|
|
||||||
location ~ ^/modules/.*/reportwidgets/.*/resources { try_files $uri /404; }
|
|
||||||
|
|
||||||
location ~ ^/plugins/.*/.*/assets { try_files $uri /404; }
|
location /storage/app/uploads/public {
|
||||||
location ~ ^/plugins/.*/.*/resources { try_files $uri /404; }
|
# add proxy cors headers
|
||||||
location ~ ^/plugins/.*/.*/behaviors/.*/assets { try_files $uri /404; }
|
add_header Access-Control-Allow-Headers "*" always;
|
||||||
location ~ ^/plugins/.*/.*/behaviors/.*/resources { try_files $uri /404; }
|
add_header Access-Control-Allow-Methods "*" always;
|
||||||
location ~ ^/plugins/.*/.*/reportwidgets/.*/assets { try_files $uri /404; }
|
add_header Access-Control-Allow-Origin "*" always;
|
||||||
location ~ ^/plugins/.*/.*/reportwidgets/.*/resources { try_files $uri /404; }
|
try_files $uri /404;
|
||||||
location ~ ^/plugins/.*/.*/formwidgets/.*/assets { try_files $uri /404; }
|
}
|
||||||
location ~ ^/plugins/.*/.*/formwidgets/.*/resources { try_files $uri /404; }
|
|
||||||
location ~ ^/plugins/.*/.*/widgets/.*/assets { try_files $uri /404; }
|
|
||||||
location ~ ^/plugins/.*/.*/widgets/.*/resources { try_files $uri /404; }
|
|
||||||
|
|
||||||
location ~ ^/themes/.*/resources { try_files $uri /404; }
|
location /storage/app/media { try_files $uri /404; }
|
||||||
|
location /storage/app/yml { try_files $uri /404; }
|
||||||
|
location /storage/app/docx { try_files $uri /404; }
|
||||||
|
location /storage/app/resized { try_files $uri /404; }
|
||||||
|
location /storage/temp/public { try_files $uri /404; }
|
||||||
|
|
||||||
|
location ~ ^/modules/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/behaviors/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/behaviors/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/widgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/widgets/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/formwidgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/formwidgets/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/reportwidgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/modules/.*/reportwidgets/.*/resources { try_files $uri /404; }
|
||||||
|
|
||||||
|
location ~ ^/plugins/.*/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/behaviors/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/behaviors/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/reportwidgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/reportwidgets/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/formwidgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/formwidgets/.*/resources { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/widgets/.*/assets { try_files $uri /404; }
|
||||||
|
location ~ ^/plugins/.*/.*/widgets/.*/resources { try_files $uri /404; }
|
||||||
|
|
||||||
|
location ~ ^/themes/.*/resources { try_files $uri /404; }
|
||||||
|
|||||||
2
config/nginx/ssl.d/.gitignore
vendored
Normal file
2
config/nginx/ssl.d/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
3
config/supervisor/.gitignore
vendored
Normal file
3
config/supervisor/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
*
|
||||||
|
!*.example
|
||||||
|
!.gitignore
|
||||||
9
config/supervisor/uvicorn.conf.example
Normal file
9
config/supervisor/uvicorn.conf.example
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[fcgi-program:uvicorn]
|
||||||
|
process_name=uvicorn-tourtennis-%(process_num)d
|
||||||
|
socket=tcp://localhost:8000
|
||||||
|
command=/var/python/tourtennis/.venv/bin/uvicorn --fd 0 main:App
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
numprocs=1
|
||||||
|
user=laradock
|
||||||
|
redirect_stderr=true
|
||||||
@ -6,9 +6,11 @@ services:
|
|||||||
- ${PROJECTS_DIR}:/usr/share/nginx/html
|
- ${PROJECTS_DIR}:/usr/share/nginx/html
|
||||||
- ./config/nginx/conf.d:/etc/nginx/conf.d
|
- ./config/nginx/conf.d:/etc/nginx/conf.d
|
||||||
- ./config/nginx/includes.d:/etc/nginx/includes.d
|
- ./config/nginx/includes.d:/etc/nginx/includes.d
|
||||||
|
- ./config/nginx/ssl.d:/etc/nginx/ssl.d
|
||||||
- ./log/nginx:/var/log/nginx
|
- ./log/nginx:/var/log/nginx
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
php:
|
php:
|
||||||
build:
|
build:
|
||||||
context: ./dockerfiles/php-fpm
|
context: ./dockerfiles/php-fpm
|
||||||
@ -38,9 +40,12 @@ services:
|
|||||||
- PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG}
|
- PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG}
|
||||||
- PHP_OPT_MAX_EXECUTION_TIME=${WORKSPACE_PHP_OPT_MAX_EXECUTION_TIME}
|
- PHP_OPT_MAX_EXECUTION_TIME=${WORKSPACE_PHP_OPT_MAX_EXECUTION_TIME}
|
||||||
- PHP_OPT_MEMORY_LIMIT=${WORKSPACE_PHP_OPT_MEMORY_LIMIT}
|
- PHP_OPT_MEMORY_LIMIT=${WORKSPACE_PHP_OPT_MEMORY_LIMIT}
|
||||||
|
- INSTALL_SUPERVISOR=${WORKSPACE_INSTALL_SUPERVISOR}
|
||||||
|
- INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ${PROJECTS_DIR}:/var/www
|
- ${PROJECTS_DIR}:/var/www
|
||||||
|
- ./config/supervisor:/etc/supervisor/conf.d
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "dockerhost:${DOCKER_HOST_IP}"
|
- "dockerhost:${DOCKER_HOST_IP}"
|
||||||
secrets:
|
secrets:
|
||||||
@ -57,6 +62,8 @@ services:
|
|||||||
- ./hostfiles:/hostfiles
|
- ./hostfiles:/hostfiles
|
||||||
- ./log/mariadb:/var/log/mariadb
|
- ./log/mariadb:/var/log/mariadb
|
||||||
- ./config/mariadb:/etc/mysql/conf.d
|
- ./config/mariadb:/etc/mysql/conf.d
|
||||||
|
security_opt:
|
||||||
|
- seccomp=unconfined
|
||||||
pma:
|
pma:
|
||||||
image: phpmyadmin/phpmyadmin
|
image: phpmyadmin/phpmyadmin
|
||||||
restart: always
|
restart: always
|
||||||
@ -67,6 +74,8 @@ services:
|
|||||||
inbucket:
|
inbucket:
|
||||||
image: inbucket/inbucket
|
image: inbucket/inbucket
|
||||||
restart: always
|
restart: always
|
||||||
|
expose:
|
||||||
|
- 2500
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
42
docker-compose.directus.yml.example
Normal file
42
docker-compose.directus.yml.example
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
services:
|
||||||
|
directus-mi:
|
||||||
|
image: directus/directus:11.1.0
|
||||||
|
ports:
|
||||||
|
- 8055:8055
|
||||||
|
volumes:
|
||||||
|
- ./data/directus/mi/uploads:/directus/uploads
|
||||||
|
- ./data/directus/mi/extensions:/directus/extensions
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
- redis-mi
|
||||||
|
environment:
|
||||||
|
KEY: ""
|
||||||
|
SECRET: ""
|
||||||
|
|
||||||
|
DB_CLIENT: "mysql"
|
||||||
|
DB_HOST: "db"
|
||||||
|
DB_PORT: "3306"
|
||||||
|
DB_DATABASE: "directus"
|
||||||
|
DB_USER: "directus"
|
||||||
|
DB_PASSWORD: "directus"
|
||||||
|
|
||||||
|
CACHE_ENABLED: "true"
|
||||||
|
CACHE_AUTO_PURGE: "true"
|
||||||
|
CACHE_STORE: "redis"
|
||||||
|
REDIS: "redis://redis-mi:6379"
|
||||||
|
|
||||||
|
CACHE_TTL: 1d
|
||||||
|
|
||||||
|
ADMIN_EMAIL: "info@wpstudio.ru"
|
||||||
|
ADMIN_PASSWORD: ""
|
||||||
|
|
||||||
|
TELEMETRY: false
|
||||||
|
ACCESS_TOKEN_TTL: 15m
|
||||||
|
REFRESH_TOKEN_TTL: 7d
|
||||||
|
LOG_LEVEL: debug
|
||||||
|
FLOWS_EXEC_ALLOWED_MODULES: "array:@elastic/elasticsearch"
|
||||||
|
WEBSOCKETS_ENABLED: true
|
||||||
|
|
||||||
|
# Make sure to set this in production
|
||||||
|
# (see https://docs.directus.io/self-hosted/config-options#general)
|
||||||
|
# PUBLIC_URL: "https://directus.example.com"
|
||||||
@ -55,10 +55,14 @@ services:
|
|||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: pma
|
service: pma
|
||||||
|
ports:
|
||||||
|
- "81:80"
|
||||||
inbucket:
|
inbucket:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.base.yml
|
file: docker-compose.base.yml
|
||||||
service: inbucket
|
service: inbucket
|
||||||
|
ports:
|
||||||
|
- "82:9000"
|
||||||
dnsmasq:
|
dnsmasq:
|
||||||
restart: always
|
restart: always
|
||||||
build:
|
build:
|
||||||
|
|||||||
6
dockerfiles/workspace/.bash_aliases.example
Normal file
6
dockerfiles/workspace/.bash_aliases.example
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
alias gst='git status'
|
||||||
|
alias ga='git add'
|
||||||
|
alias gc='git commit -m'
|
||||||
|
alias gush='git push'
|
||||||
|
alias gull='git pull'
|
||||||
|
alias gb='git branch'
|
||||||
3
dockerfiles/workspace/.gitignore
vendored
3
dockerfiles/workspace/.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/aliases.sh
|
/.bash_*
|
||||||
|
!/.bash_.example
|
||||||
/crontab
|
/crontab
|
||||||
|
|||||||
@ -1,30 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
# Colors used for status updates
|
|
||||||
ESC_SEQ="\x1b["
|
|
||||||
COL_RESET=$ESC_SEQ"39;49;00m"
|
|
||||||
COL_RED=$ESC_SEQ"31;01m"
|
|
||||||
COL_GREEN=$ESC_SEQ"32;01m"
|
|
||||||
COL_YELLOW=$ESC_SEQ"33;01m"
|
|
||||||
COL_BLUE=$ESC_SEQ"34;01m"
|
|
||||||
COL_MAGENTA=$ESC_SEQ"35;01m"
|
|
||||||
COL_CYAN=$ESC_SEQ"36;01m"
|
|
||||||
|
|
||||||
# Detect which `ls` flavor is in use
|
|
||||||
if ls --color > /dev/null 2>&1; then # GNU `ls`
|
|
||||||
colorflag="--color"
|
|
||||||
export LS_COLORS='no=00:fi=00:di=01;31:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:'
|
|
||||||
else # macOS `ls`
|
|
||||||
colorflag="-G"
|
|
||||||
export LSCOLORS='BxBxhxDxfxhxhxhxhxcxcx'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Always use color output for `ls`
|
|
||||||
alias ls="command ls ${colorflag}"
|
|
||||||
|
|
||||||
alias gst='git status'
|
|
||||||
alias ga='git add'
|
|
||||||
alias gc='git commit -m'
|
|
||||||
alias gush='git push'
|
|
||||||
alias gull='git pull'
|
|
||||||
alias gb='git branch'
|
|
||||||
@ -71,17 +71,72 @@ RUN composer self-update # Need for correctly update to actual old branch
|
|||||||
RUN composer self-update --${COMPOSER_VERSION}
|
RUN composer self-update --${COMPOSER_VERSION}
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Laradock Aliases
|
# YADM
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
|
# once please
|
||||||
|
RUN apt update
|
||||||
|
|
||||||
|
RUN apt install -y direnv yadm
|
||||||
|
RUN curl -sS https://starship.rs/install.sh | sh -s -- -f
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
COPY ./aliases.sh /home/laradock/aliases.sh
|
RUN yadm clone --bootstrap https://vcs.wpstudio.ru/gitea/dotfiles.git
|
||||||
|
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN sed -i 's/#/\\$/g' ${HOME}/.config/starship.toml
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
|
||||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
###########################################################################
|
||||||
echo "" >> ~/.bashrc
|
# SUPERVISOR:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_SUPERVISOR=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \
|
||||||
|
apt install -y supervisor \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
RUN apt install -y liblzma-dev libbz2-dev libffi-dev libreadline-dev
|
||||||
|
|
||||||
|
USER laradock
|
||||||
|
|
||||||
|
RUN curl https://pyenv.run | bash
|
||||||
|
|
||||||
|
RUN echo '' >> ~/.shell-env.local && \
|
||||||
|
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.shell-env.local && \
|
||||||
|
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.shell-env.local && \
|
||||||
|
echo 'eval "$(pyenv init -)"' >> ~/.shell-env.local && \
|
||||||
|
echo '' >> ~/.shell-env.local && \
|
||||||
|
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.shell-env.local && \
|
||||||
|
echo '' >> ~/.shell-env.local
|
||||||
|
|
||||||
|
RUN $HOME/.pyenv/bin/pyenv install 3.9
|
||||||
|
|
||||||
|
ARG INSTALL_PYTHON=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||||
|
export PYENV_VERSION=3.9 && \
|
||||||
|
python -m pip install uvicorn \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
RUN if [ false = true ]; then \
|
||||||
|
export PYENV_VERSION=3.9 && \
|
||||||
|
python -m pip install uvicorn && \
|
||||||
|
python -m pip install --upgrade supervisor && \
|
||||||
|
echo_supervisord_conf > /etc/supervisord.conf && \
|
||||||
|
sed -i 's/\;\[include\]/\[include\]/g' /etc/supervisord.conf && \
|
||||||
|
sed -i 's/\;files\s.*/files = supervisord.d\/*.conf/g' /etc/supervisord.conf \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN apt install -y htop
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Tune opts:
|
# Tune opts:
|
||||||
@ -104,6 +159,13 @@ RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" /etc/ph
|
|||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
RUN apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
COPY ./crontab /etc/cron.d
|
COPY ./crontab /etc/cron.d
|
||||||
|
|
||||||
RUN chmod -R 644 /etc/cron.d
|
RUN chmod -R 644 /etc/cron.d
|
||||||
|
|
||||||
|
|
||||||
|
#ENTRYPOINT ["/bin/bash","-c","service supervisor start"]
|
||||||
@ -1,4 +1,5 @@
|
|||||||
# syntax = edrevo/dockerfile-plus
|
# syntax = edrevo/dockerfile-plus
|
||||||
|
# https://github.com/docker-library/php/blob/52062af5056d0cd91fa5ded64fad8f9c82847b49/8.1/bookworm/fpm/Dockerfile
|
||||||
FROM php:8.1-fpm
|
FROM php:8.1-fpm
|
||||||
|
|
||||||
INCLUDE+ ./php.base.Dockerfile
|
INCLUDE+ ./php.base.Dockerfile
|
||||||
|
|||||||
@ -74,7 +74,7 @@ RUN sed -i 's/\r//' /root/aliases.sh && \
|
|||||||
echo "" >> ~/.bashrc && \
|
echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc \
|
echo "" >> ~/.bashrc
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# ssh:
|
# ssh:
|
||||||
|
|||||||
Reference in New Issue
Block a user