From d8f018d27fbf57cc3526179dc6f37555ded044e2 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 2 Apr 2020 15:12:10 +0800 Subject: [PATCH] first --- .gitmodules | 3 +++ caddy.conf | 8 ++++++++ crontabs.conf | 1 + docker-compose.yaml | 14 ++++++++++++++ supervisord.conf | 13 +++++++++++++ www | 1 + wwwlogs/.gitignore | 1 + 7 files changed, 41 insertions(+) create mode 100644 .gitmodules create mode 100644 caddy.conf create mode 100644 crontabs.conf create mode 100644 docker-compose.yaml create mode 100644 supervisord.conf create mode 160000 www create mode 100644 wwwlogs/.gitignore diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..275b844 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "www"] + path = www + url = https://github.com/v2board/v2board.git diff --git a/caddy.conf b/caddy.conf new file mode 100644 index 0000000..220ec08 --- /dev/null +++ b/caddy.conf @@ -0,0 +1,8 @@ +http://localhost { + root /www/public + log /wwwlogs/caddy.log + fastcgi / /tmp/php-cgi.sock php + rewrite { + to {path} {path}/ /index.php?{query} + } +} \ No newline at end of file diff --git a/crontabs.conf b/crontabs.conf new file mode 100644 index 0000000..36cba15 --- /dev/null +++ b/crontabs.conf @@ -0,0 +1 @@ +* * * * * php /www/artisan schedule:run >> /dev/null 2>&1 \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..ddc50b2 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,14 @@ +version: '3' +services: + www: + image: tokumeikoi/lcrp + volumes: + - './www:/www' + - './wwwlogs:/wwwlogs' + - './caddy.conf:/run/caddy/caddy.conf' + - './supervisord.conf:/run/supervisor/supervisord.conf' + - './crontabs.conf:/etc/crontabs/root' + ports: + - '80:80' + - '443:443' + restart: always \ No newline at end of file diff --git a/supervisord.conf b/supervisord.conf new file mode 100644 index 0000000..bc0a3a8 --- /dev/null +++ b/supervisord.conf @@ -0,0 +1,13 @@ +;supervisor config + +[program:v2board] +process_name=%(program_name)s_%(process_num)02d +command=php /www/artisan queue:work --queue=send_email +stdout_logfile=/wwwlogs/queue.log +stdout_logfile_maxbytes=0 +stderr_logfile=/wwwlogs/queue_error.log +stderr_logfile_maxbytes=0 +autostart=true +autorestart=true +startretries=0 +numprocs=4 \ No newline at end of file diff --git a/www b/www new file mode 160000 index 0000000..68f7cde --- /dev/null +++ b/www @@ -0,0 +1 @@ +Subproject commit 68f7cdeed89e83353a01d38ce795bb3586a0f254 diff --git a/wwwlogs/.gitignore b/wwwlogs/.gitignore new file mode 100644 index 0000000..bf0824e --- /dev/null +++ b/wwwlogs/.gitignore @@ -0,0 +1 @@ +*.log \ No newline at end of file