Skip to content

Commit 7f5d9d0

Browse files
author
Zuohuadong
committed
add postgresql for php-fpm
1 parent 17ea7b3 commit 7f5d9d0

10 files changed

Lines changed: 61 additions & 26 deletions

File tree

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ env:
3333
- PHP_VERSION=70 BUILD_SERVICE=aerospike
3434
- PHP_VERSION=71 BUILD_SERVICE=aerospike
3535

36-
- PHP_VERSION=56 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
37-
- PHP_VERSION=70 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
38-
- PHP_VERSION=71 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
36+
- PHP_VERSION=56 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 balancer"
37+
- PHP_VERSION=70 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 balancer"
38+
- PHP_VERSION=71 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 balancer"
3939

4040
- HUGO_VERSION=0.20.2
4141

DOCUMENTATION/content/introduction/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Beanstalkd - RabbitMQ - PHP Worker
9797
- **Queueing Management:**
9898
Beanstalkd Console - RabbitMQ Console
9999
- **Random Tools:**
100-
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Mailhog - Minio - Varnish - Swoole - Laravel Echo...
100+
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Mailhog - MailDev - Minio - Varnish - Swoole - Laravel Echo...
101101

102102
Laradock introduces the **Workspace** Image, as a development environment.
103103
It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose.

caddy/Dockerfile

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
FROM alpine:3.5
1+
FROM golang
22

3-
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
3+
MAINTAINER Huadong Zuo <admin@zuohuadong.cn>
44

5-
ENV caddy_version=0.10.5
6-
ARG plugins=http.git
5+
ARG plugins="git"
76

8-
LABEL caddy_version="$caddy_version" architecture="amd64"
7+
## If you come frome china, please ues it.
98

10-
RUN apk update \
11-
&& apk upgrade \
12-
&& apk add --no-cache openssh-client git tar curl
9+
# RUN echo "172.217.6.127 golang.org" >> /etc/hosts
1310

14-
RUN curl --silent --show-error --fail --location \
15-
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
16-
"https://caddyserver.com/download/linux/amd64?plugins=${plugins}" \
17-
| tar --no-same-owner -C /usr/bin/ -xz caddy \
18-
&& mv /usr/bin/caddy /usr/bin/caddy \
19-
&& chmod 0755 /usr/bin/caddy
11+
RUN go get github.com/abiosoft/caddyplug/caddyplug \
12+
&& caddyplug install-caddy \
13+
&& caddyplug install git
14+
RUN caddy --version
2015

2116
EXPOSE 80 443 2015
2217

docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,17 @@ services:
550550
- frontend
551551
- backend
552552

553+
### MailDev Container #######################################
554+
555+
maildev:
556+
build: ./maildev
557+
ports:
558+
- "${MAILDEV_HTTP_PORT}:80"
559+
- "${MAILDEV_SMTP_PORT}:25"
560+
networks:
561+
- frontend
562+
- backend
563+
553564
### Selenium Container ########################################
554565

555566
selenium:

env-example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ PHP_FPM_INSTALL_OPCACHE=false
7676
PHP_FPM_INSTALL_EXIF=false
7777
PHP_FPM_INSTALL_AEROSPIKE=false
7878
PHP_FPM_INSTALL_MYSQLI=false
79+
PHP_FPM_INSTALL_POSTGRES=false
7980
PHP_FPM_INSTALL_TOKENIZER=false
8081
PHP_FPM_INSTALL_INTL=false
8182
PHP_FPM_INSTALL_GHOSTSCRIPT=false
@@ -205,6 +206,11 @@ PMA_PASSWORD=secret
205206
PMA_ROOT_PASSWORD=secret
206207
PMA_PORT=8080
207208

209+
### MAILDEV ############################################################################################################
210+
211+
MAILDEV_HTTP_PORT=1080
212+
MAILDEV_SMTP_PORT=25
213+
208214
### VARNISH ############################################################################################################
209215

210216
VARNISH_CONFIG=/etc/varnish/default.vcl

jenkins/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ VOLUME /var/jenkins_home
2525
# or config file with your custom jenkins Docker image.
2626
RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d
2727

28-
ENV TINI_VERSION 0.13.2
29-
ENV TINI_SHA afbf8de8a63ce8e4f18cb3f34dfdbbd354af68a1
28+
ENV TINI_VERSION 0.16.1
29+
ENV TINI_SHA d1cb5d71adc01d47e302ea439d70c79bd0864288
3030

3131
# Use tini as subreaper in Docker container to adopt zombie processes
3232
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \
@@ -36,18 +36,18 @@ COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-agent-port.groov
3636

3737
# jenkins version being bundled in this docker image
3838
ARG JENKINS_VERSION
39-
ENV JENKINS_VERSION ${JENKINS_VERSION:-2.32.3}
39+
ENV JENKINS_VERSION ${JENKINS_VERSION:-2.73.2}
4040

4141
# jenkins.war checksum, download will be validated using it
42-
ARG JENKINS_SHA=a25b9a314ca9e76f9673da7309e1882e32674223
42+
ARG JENKINS_SHA=f6d1351beef34d980b32f8c463be505445f637e2fc62156fecd42891c53c97d3
4343

4444
# Can be used to customize where jenkins.war get downloaded from
4545
ARG JENKINS_URL=https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-war/${JENKINS_VERSION}/jenkins-war-${JENKINS_VERSION}.war
4646

4747
# could use ADD but this one does not check Last-Modified header neither does it allow to control checksum
4848
# see https://github.com/docker/docker/issues/8331
4949
RUN curl -fsSL ${JENKINS_URL} -o /usr/share/jenkins/jenkins.war \
50-
&& echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" | sha1sum -c -
50+
&& echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" | sha256sum -c -
5151

5252
ENV JENKINS_UC https://updates.jenkins.io
5353
RUN chown -R ${user} "$JENKINS_HOME" /usr/share/jenkins/ref
@@ -71,7 +71,7 @@ RUN apt-get install -y curl && curl -sSL https://get.docker.com/ | sh
7171
RUN usermod -aG docker jenkins
7272

7373
# Install Docker-Compose
74-
RUN curl -L "https://github.com/docker/compose/releases/download/1.10.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
74+
RUN curl -L "https://github.com/docker/compose/releases/download/1.16.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
7575
RUN chmod +x /usr/local/bin/docker-compose
7676

7777

maildev/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM djfarrelly/maildev
2+
3+
MAINTAINER Maxime Hélias <maximehelias16@gmail.com>
4+
5+
EXPOSE 80 25

php-fpm/Dockerfile-70

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,15 @@ RUN if [ ${INSTALL_MYSQLI} = true ]; then \
207207
docker-php-ext-install mysqli \
208208
;fi
209209

210+
#####################################
211+
# postgres Modifications:
212+
#####################################
213+
214+
ARG INSTALL_POSTGRES=false
215+
RUN if [ ${INSTALL_POSTGRES} = true ]; then \
216+
docker-php-ext-install pgsql \
217+
;fi
218+
210219
#####################################
211220
# Tokenizer Modifications:
212221
#####################################

php-fpm/Dockerfile-71

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,15 @@ RUN if [ ${INSTALL_MYSQLI} = true ]; then \
216216
docker-php-ext-install mysqli \
217217
;fi
218218

219+
#####################################
220+
# postgres Modifications:
221+
#####################################
222+
223+
ARG INSTALL_POSTGRES=false
224+
RUN if [ ${INSTALL_POSTGRES} = true ]; then \
225+
docker-php-ext-install pgsql \
226+
;fi
227+
219228
#####################################
220229
# Tokenizer Modifications:
221230
#####################################

postgres/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM postgres:latest
1+
FROM postgres:alpine
22

33
MAINTAINER Ben M <git@bmagg.com>
44

55
CMD ["postgres"]
66

7-
EXPOSE 5432
7+
EXPOSE 5432

0 commit comments

Comments
 (0)