Updates development.sh
This commit is contained in:
parent
9a4d9c75bd
commit
45a3fc595f
5 changed files with 25 additions and 17 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
FROM php:7.2.11-fpm-alpine3.7 as build
|
FROM php:7.2.5-fpm-alpine3.7 as build
|
||||||
|
|
||||||
RUN apk update \
|
RUN apk update \
|
||||||
&& apk add --no-cache libpng-dev zeromq-dev git \
|
&& apk add --no-cache libpng-dev zeromq-dev git \
|
||||||
|
|
@ -25,6 +25,12 @@ COPY static/nginx/site.conf /etc/nginx/templateSite.conf
|
||||||
# Configure PHP-FPM
|
# Configure PHP-FPM
|
||||||
COPY static/php/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf
|
COPY static/php/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf
|
||||||
|
|
||||||
|
# DEBUG
|
||||||
|
RUN apk add php7-xdebug --repository http://dl-3.alpinelinux.org/alpine/edge/testing/
|
||||||
|
COPY static/php/xdebug.ini /etc/php7/conf.d/xdebug.ini
|
||||||
|
COPY static/php/error_reporting.ini /etc/php7/conf.d/error_reporting.ini
|
||||||
|
RUN echo "zend_extension=/usr/lib/php7/modules/xdebug.so" >> /etc/php7/php.ini
|
||||||
|
|
||||||
COPY static/php/php.ini /etc/zzz_custom.ini
|
COPY static/php/php.ini /etc/zzz_custom.ini
|
||||||
# configure cron
|
# configure cron
|
||||||
COPY static/crontab.txt /var/crontab.txt
|
COPY static/crontab.txt /var/crontab.txt
|
||||||
|
|
@ -35,6 +41,7 @@ COPY static/entrypoint.sh /
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
COPY --chown=nobody --from=build /app pathfinder
|
COPY --chown=nobody --from=build /app pathfinder
|
||||||
|
|
||||||
|
|
||||||
RUN chmod 0766 pathfinder/logs pathfinder/tmp/ && rm index.php && touch /etc/nginx/.setup_pass && chmod +x /entrypoint.sh
|
RUN chmod 0766 pathfinder/logs pathfinder/tmp/ && rm index.php && touch /etc/nginx/.setup_pass && chmod +x /entrypoint.sh
|
||||||
COPY static/pathfinder/routes.ini /var/www/html/pathfinder/app/
|
COPY static/pathfinder/routes.ini /var/www/html/pathfinder/app/
|
||||||
COPY static/pathfinder/environment.ini /var/www/html/pathfinder/app/templateEnvironment.ini
|
COPY static/pathfinder/environment.ini /var/www/html/pathfinder/app/templateEnvironment.ini
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,15 @@ cp ./development/xdebug.ini ./static/php/xdebug.ini
|
||||||
# set up launch file for vscode
|
# set up launch file for vscode
|
||||||
mkdir -p .vscode && cp ./development/launch.json ./.vscode/launch.json
|
mkdir -p .vscode && cp ./development/launch.json ./.vscode/launch.json
|
||||||
|
|
||||||
# seed .env file with dev presets
|
# seed .env unless --noenv flag is set
|
||||||
echo "PROJECT_ROOT=\"$(pwd)\"" > ./.env
|
while true; do
|
||||||
cat ./development/.env.development >> ./.env
|
case "$1" in
|
||||||
echo "Remember to set your CCP SSO Client and Secret keys"
|
--noenv ) NO_ENV=true; shift ;;
|
||||||
|
* ) break ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [ ! "$NO_ENV" == "true" ]; then
|
||||||
|
echo "PROJECT_ROOT=\"$(pwd)\"" > ./.env
|
||||||
|
cat ./development/.env.development >> ./.env
|
||||||
|
echo "WARNING: .env has been replaced, remember to fill any required variables"
|
||||||
|
fi
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,7 @@ services:
|
||||||
- "traefik.http.routers.pf.entrypoints=web"
|
- "traefik.http.routers.pf.entrypoints=web"
|
||||||
- "traefik.http.routers.pf-secure.rule=Host(`${DOMAIN}`)"
|
- "traefik.http.routers.pf-secure.rule=Host(`${DOMAIN}`)"
|
||||||
- "traefik.http.routers.pf-secure.entrypoints=websecure"
|
- "traefik.http.routers.pf-secure.entrypoints=websecure"
|
||||||
- "traefik.http.routers.pf-secure.tls=true"
|
- "traefik.http.routers.pf-secure.tls=true"
|
||||||
- "traefik.http.routers.pf-secure.tls.certresolver=letsencrypt"
|
|
||||||
- "traefik.http.middlewares.redirecthttps.redirectscheme.scheme=https"
|
- "traefik.http.middlewares.redirecthttps.redirectscheme.scheme=https"
|
||||||
- "traefik.http.routers.pf.middlewares=redirecthttps"
|
- "traefik.http.routers.pf.middlewares=redirecthttps"
|
||||||
networks:
|
networks:
|
||||||
|
|
@ -84,19 +83,12 @@ services:
|
||||||
- "--providers.docker.exposedbydefault=false"
|
- "--providers.docker.exposedbydefault=false"
|
||||||
- "--entrypoints.web.address=:80"
|
- "--entrypoints.web.address=:80"
|
||||||
- "--entrypoints.websecure.address=:443"
|
- "--entrypoints.websecure.address=:443"
|
||||||
- "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
|
|
||||||
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
|
|
||||||
- "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
|
|
||||||
# Remove below line when ready for production
|
|
||||||
- "--certificatesresolvers.letsencrypt.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
|
|
||||||
- "--certificatesresolvers.letsencrypt.acme.email=MYEMAIL@someemailprobablygmail.com"
|
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||||
- "${PROJECT_ROOT}/letsencrypt:/letsencrypt"
|
|
||||||
networks:
|
networks:
|
||||||
- web
|
- web
|
||||||
restart: always
|
restart: always
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,16 @@
|
||||||
; project environment (DEVELOP || PRODUCTION).
|
; project environment (DEVELOP || PRODUCTION).
|
||||||
; This effects: DB connection, Mail-Server, SSO, ESI configurations in this file
|
; This effects: DB connection, Mail-Server, SSO, ESI configurations in this file
|
||||||
; configuration below
|
; configuration below
|
||||||
SERVER = PRODUCTION
|
SERVER = DEVELOPMENT
|
||||||
|
|
||||||
[ENVIRONMENT.PRODUCTION]
|
[ENVIRONMENT.DEVELOPMENT]
|
||||||
; path to index.php (Default: leave blank == "auto-detect")
|
; path to index.php (Default: leave blank == "auto-detect")
|
||||||
; -> e.g. set /pathfinder if your URL looks like https://www.[YOUR_DOMAIN]/pathfinder (subfolder)
|
; -> e.g. set /pathfinder if your URL looks like https://www.[YOUR_DOMAIN]/pathfinder (subfolder)
|
||||||
BASE =
|
BASE =
|
||||||
; deployment URL (e.g. https://www.pathfinder-w.space)
|
; deployment URL (e.g. https://www.pathfinder-w.space)
|
||||||
URL = {{@SCHEME}}://$DOMAIN
|
URL = {{@SCHEME}}://$DOMAIN
|
||||||
; level of debug/error stack trace
|
; level of debug/error stack trace
|
||||||
DEBUG = 0
|
DEBUG = 3
|
||||||
; Pathfinder database
|
; Pathfinder database
|
||||||
DB_PF_DNS = mysql:host=${CONTAINER_NAME}db;port=3306;dbname=
|
DB_PF_DNS = mysql:host=${CONTAINER_NAME}db;port=3306;dbname=
|
||||||
DB_PF_NAME = pf
|
DB_PF_NAME = pf
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ fastcgi.logging=0
|
||||||
request_terminate_timeout = 300
|
request_terminate_timeout = 300
|
||||||
session.save_handler = redis
|
session.save_handler = redis
|
||||||
session.save_path = "tcp://${CONTAINER_NAME}-redis:6379"
|
session.save_path = "tcp://${CONTAINER_NAME}-redis:6379"
|
||||||
|
zend_extension=/usr/lib/php7/modules/xdebug.so
|
||||||
[Date]
|
[Date]
|
||||||
date.timezone="UTC"
|
date.timezone="UTC"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue