- 浏览: 2551247 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Flarum BBS System(2)Docker the BBS
Change PHP to version 7.1.24 in Docker, it seems everything works fine.
Steps to generate the latest PHP Project
In the working directory
> mkdir flarum
> cd flarum/
> composer create-project flarum/flarum . --stability=beta
It seems we need execute the command to install the dependency
> composer install
Here is the Docker Related Configuration
Command to execute the PHP and Nginx in start.sh
#!/bin/sh -ex
cd /tool/php-7.1.24
sbin/php-fpm -R
cd /tool/nginx-1.14.0
sbin/nginx -g "daemon off;"
Makefile to operate all the steps to build the image
PORT = 8081
IMAGE=sillycat/public
TAG=centos7-flarum
NAME=centos7-flarum-$(PORT)
prepare:
wget http://am1.php.net/distributions/php-7.1.24.tar.gz -P install/
wget https://nginx.org/download/nginx-1.14.0.tar.gz -P install/
docker-context:
build: docker-context
docker build -t $(IMAGE):$(TAG) .
run:
docker run -d -p $(PORT):80 -v $(shell pwd)/html:/tool/nginx-1.14.0/html --name $(NAME) $(IMAGE):$(TAG)
debug:
docker run -ti -p $(PORT):80 -v $(shell pwd)/html:/tool/nginx-1.14.0/html --name $(NAME) $(IMAGE):$(TAG) /bin/bash
clean:
docker stop ${NAME}
docker rm ${NAME}
logs:
docker logs ${NAME}
publish:
docker push ${IMAGE}
Steps to build Image in the Dockerfile
#Set Up PHP FPM
#Prepre the OS
FROM centos:7
MAINTAINER Carl Luo <luohuazju@gmail.com>
#install the softwarea
RUN yum -y update
RUN yum install -y wget gcc make
RUN yum install -y openssl-devel
RUN yum install -y zlib-devel pcre-devel
RUN yum -y install libxml2-devel curl-devel libjpeg-devel libpng-devel freetype-devel freetype
#install PHP
RUN mkdir -p /tool
RUN mkdir -p /install
ADD install/php-7.1.24.tar.gz /install/
WORKDIR /install/php-7.1.24
RUN ./configure --prefix=/tool/php-7.1.24 --enable-fpm --with-fpm-user=root --with-fpm-group=root --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-ftp --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-fileinfo --enable-maintainer-zts
RUN make
RUN make install
#config PHP
ADD conf/www.conf /tool/php-7.1.24/etc/php-fpm.d/
ADD conf/php-fpm.conf /tool/php-7.1.24/etc/
#install nginx
ADD install/nginx-1.14.0.tar.gz /install/
WORKDIR /install/nginx-1.14.0
RUN ./configure --prefix=/tool/nginx-1.14.0
RUN make
RUN make install
#config nginx
ADD conf/nginx.conf /tool/nginx-1.14.0/conf/
RUN chmod -R 777 /tool/nginx-1.14.0/html/
#start the application
EXPOSE 80
RUN mkdir -p /app/
ADD start.sh /app/
WORKDIR /app/
CMD [ "./start.sh" ]
The nginx.conf to configure the flarum project
user root root;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name kikokang.ddns.net;
root /tool/nginx-1.14.0/html/flarum;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location /api {
try_files $uri $uri/ /api.php?$query_string;
}
location /admin {
try_files $uri $uri/ /admin.php?$query_string;
}
location /flarum {
deny all;
return 404;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY "";
fastcgi_index index.php;
}
location ~* \.html$ { expires -1; }
location ~* \.(css|js|gif|jpe?g|png)$ {
expires 1M;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidat";
}
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types application/atom+xml
application/javascript
application/json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
#text/html -- text/html is gzipped by default by nginx
text/plain
text/xml;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
}
}
The important thing is to change the file in html/flarum/config.php, change the URL to your domain
'url' => 'https://kikokang.ddns.net’,
But I think this is setup by the first step when you put your database information there.
How to Setup The Email
First login in as admin, on the drop down menu, choose ‘adminitrator’ —> Email, here is one example for GMAIL
SMTP Server
Driver: smtp
Host: smtp.gmail.com
Port: 465
Encryption: ssl
SMTP Account:
Username: xxxxx@gmail.com
Password: xxxxx
Addresses:
Sender: xxxxxx@gmail.com
I followed this discussion
https://discuss.flarum.org/d/4979-sign-up-and-email-not-working/28
You need to go to your gmail. Click on ‘Account’ —> “Sign-in & security” —> Apps with account access —> “Allow less secure apps: ON"
You may need to check your security alert emails to confirm you are the one who attempt to login as well.
References:
http://sillycat.iteye.com/blog/2433972
Email Configuration
https://discuss.flarum.org/d/879-how-do-i-change-email-settings-to-gmail-smtp/3
Change PHP to version 7.1.24 in Docker, it seems everything works fine.
Steps to generate the latest PHP Project
In the working directory
> mkdir flarum
> cd flarum/
> composer create-project flarum/flarum . --stability=beta
It seems we need execute the command to install the dependency
> composer install
Here is the Docker Related Configuration
Command to execute the PHP and Nginx in start.sh
#!/bin/sh -ex
cd /tool/php-7.1.24
sbin/php-fpm -R
cd /tool/nginx-1.14.0
sbin/nginx -g "daemon off;"
Makefile to operate all the steps to build the image
PORT = 8081
IMAGE=sillycat/public
TAG=centos7-flarum
NAME=centos7-flarum-$(PORT)
prepare:
wget http://am1.php.net/distributions/php-7.1.24.tar.gz -P install/
wget https://nginx.org/download/nginx-1.14.0.tar.gz -P install/
docker-context:
build: docker-context
docker build -t $(IMAGE):$(TAG) .
run:
docker run -d -p $(PORT):80 -v $(shell pwd)/html:/tool/nginx-1.14.0/html --name $(NAME) $(IMAGE):$(TAG)
debug:
docker run -ti -p $(PORT):80 -v $(shell pwd)/html:/tool/nginx-1.14.0/html --name $(NAME) $(IMAGE):$(TAG) /bin/bash
clean:
docker stop ${NAME}
docker rm ${NAME}
logs:
docker logs ${NAME}
publish:
docker push ${IMAGE}
Steps to build Image in the Dockerfile
#Set Up PHP FPM
#Prepre the OS
FROM centos:7
MAINTAINER Carl Luo <luohuazju@gmail.com>
#install the softwarea
RUN yum -y update
RUN yum install -y wget gcc make
RUN yum install -y openssl-devel
RUN yum install -y zlib-devel pcre-devel
RUN yum -y install libxml2-devel curl-devel libjpeg-devel libpng-devel freetype-devel freetype
#install PHP
RUN mkdir -p /tool
RUN mkdir -p /install
ADD install/php-7.1.24.tar.gz /install/
WORKDIR /install/php-7.1.24
RUN ./configure --prefix=/tool/php-7.1.24 --enable-fpm --with-fpm-user=root --with-fpm-group=root --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-ftp --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-fileinfo --enable-maintainer-zts
RUN make
RUN make install
#config PHP
ADD conf/www.conf /tool/php-7.1.24/etc/php-fpm.d/
ADD conf/php-fpm.conf /tool/php-7.1.24/etc/
#install nginx
ADD install/nginx-1.14.0.tar.gz /install/
WORKDIR /install/nginx-1.14.0
RUN ./configure --prefix=/tool/nginx-1.14.0
RUN make
RUN make install
#config nginx
ADD conf/nginx.conf /tool/nginx-1.14.0/conf/
RUN chmod -R 777 /tool/nginx-1.14.0/html/
#start the application
EXPOSE 80
RUN mkdir -p /app/
ADD start.sh /app/
WORKDIR /app/
CMD [ "./start.sh" ]
The nginx.conf to configure the flarum project
user root root;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name kikokang.ddns.net;
root /tool/nginx-1.14.0/html/flarum;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location /api {
try_files $uri $uri/ /api.php?$query_string;
}
location /admin {
try_files $uri $uri/ /admin.php?$query_string;
}
location /flarum {
deny all;
return 404;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY "";
fastcgi_index index.php;
}
location ~* \.html$ { expires -1; }
location ~* \.(css|js|gif|jpe?g|png)$ {
expires 1M;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidat";
}
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types application/atom+xml
application/javascript
application/json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
#text/html -- text/html is gzipped by default by nginx
text/plain
text/xml;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
}
}
The important thing is to change the file in html/flarum/config.php, change the URL to your domain
'url' => 'https://kikokang.ddns.net’,
But I think this is setup by the first step when you put your database information there.
How to Setup The Email
First login in as admin, on the drop down menu, choose ‘adminitrator’ —> Email, here is one example for GMAIL
SMTP Server
Driver: smtp
Host: smtp.gmail.com
Port: 465
Encryption: ssl
SMTP Account:
Username: xxxxx@gmail.com
Password: xxxxx
Addresses:
Sender: xxxxxx@gmail.com
I followed this discussion
https://discuss.flarum.org/d/4979-sign-up-and-email-not-working/28
You need to go to your gmail. Click on ‘Account’ —> “Sign-in & security” —> Apps with account access —> “Allow less secure apps: ON"
You may need to check your security alert emails to confirm you are the one who attempt to login as well.
References:
http://sillycat.iteye.com/blog/2433972
Email Configuration
https://discuss.flarum.org/d/879-how-do-i-change-email-settings-to-gmail-smtp/3
发表评论
-
Stop Update Here
2020-04-28 09:00 315I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 475NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 367Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 368Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 336Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 430Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 435Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 373Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 454VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 384Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 477NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 421Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 337Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 246GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 450GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 326GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 312Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 317Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 292Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 311Serverless with NodeJS and Tenc ...
相关推荐
蒙代尼 标签可用 最新 稳定 0.1.0-beta.16 0.1.0-beta.15 特征 .../ flarum / app / public / assets :Flarum资产目录 / flarum / app / extensions :Flarum扩展目录 / etc / nginx / flarum :
关于基于Alpine Linux的 Docker映像。 如果您有兴趣,我的其他Docker映像! :light_bulb: 想要收到新版本的通知吗...flarum.gitcd docker-flarum# Build image and output to docker (default)docker buildx bake# Bui
描述提到"最新版 boot2docker.iso",说明这个ISO文件是boot2docker的最新发行版,"安装、启动docker的必备文件"暗示了boot2docker用于在不同的平台上快速启动Docker环境,特别是对于那些不支持直接安装Docker的系统...
**Boot2Docker ISO的v18.02.0-ce版本详解** Boot2Docker是一款轻量级的Linux发行版,专为在Docker容器上运行而设计。它的主要目的是提供一个简单、快速的方式来运行Docker主机,尤其适合开发者在本地环境中进行...
来自 https://github.com/boot2docker/boot2docker/releases/download/v18.06.0-ce/boot2docker.iso
boot2docker.iso国内下载v19.03.12,复制文件boot2docker.iso到C:\Users\mid1507\.docker\machine\cache\boot2docker.iso目录,重新打开Docker Quickstart Terminal。
boot2docker v18,docker安装包,toolbox安装包 windows版本
https://github.com/boot2docker/boot2docker/releases 最新boot2docker v19.03.0/boot2docker.iso
boot2docker boot2docker boot2docker boot2docker boot2docker
**Boot2Docker ISO的V18.05.0-CE版本详解** Boot2Docker是一款轻量级的Linux发行版,专为在虚拟机上运行Docker容器而设计。它提供了一个精简的环境,使用户能够在任何支持虚拟化的平台上快速启动Docker服务,如...
在Docker首次启动时需要下载的一个boot2docker.iso,但是因为这个文件的官方位置是在 GitHub,所以在国内不一定能下载下来 下载后,复制文件boot2docker.iso到C:\Users\xianyi\.docker\machine\cache\boot2docker....
window dockerbox中需要的启动镜像,对应版本v18.06.0-ce 下载解压后保存到位置(默认安装情况下) C:\Users\您的用户名\.docker\machine\machines\default\boot2docker.iso
boot2docker.iso docker 最新版本镜像文件v19.03.12.在github上下载太慢以及下载不下来。放到csdn 上方便快速下载使用
从https://github.com/下载下来的,boot2docker.iso镜像,v17.12.1-ce版本的。
从https://github.com/boot2docker/boot2docker/releases下载下来的
Warning: the AUFS storage driver is deprecated in boot2docker and AUFS support is removed in 18.09+. You can continue with AUFS in boot2docker 18.06.x, but it is recommended to reset your disk image ...
docker安装卡死在boot2docker.iso的下载,下载完之后放到C:\Users\xxx\.docker\machine\cache目录下,并删除之前未下载成功的tmp文件
boot2docker.iso v17.06.2-ce 版本。 在使用 docker-machine 时用到。 macOS: 将其拷贝至 ~/.docker/machine/cache/ Boot2Docker是一个专为Docker而设计的轻量级Linux发行包,解决Win或者OS X用户不能安装Docker的...
docker java连接数据库报错 The server selected protocol version T
亲测可用 docker-machine create --driver virtualbox manager1