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 \
|
||||
&& 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
|
||||
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
|
||||
# configure cron
|
||||
COPY static/crontab.txt /var/crontab.txt
|
||||
|
|
@ -35,6 +41,7 @@ COPY static/entrypoint.sh /
|
|||
WORKDIR /var/www/html
|
||||
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
|
||||
COPY static/pathfinder/routes.ini /var/www/html/pathfinder/app/
|
||||
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
|
||||
mkdir -p .vscode && cp ./development/launch.json ./.vscode/launch.json
|
||||
|
||||
# seed .env file with dev presets
|
||||
# seed .env unless --noenv flag is set
|
||||
while true; do
|
||||
case "$1" in
|
||||
--noenv ) NO_ENV=true; shift ;;
|
||||
* ) break ;;
|
||||
esac
|
||||
done
|
||||
if [ ! "$NO_ENV" == "true" ]; then
|
||||
echo "PROJECT_ROOT=\"$(pwd)\"" > ./.env
|
||||
cat ./development/.env.development >> ./.env
|
||||
echo "Remember to set your CCP SSO Client and Secret keys"
|
||||
echo "WARNING: .env has been replaced, remember to fill any required variables"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ services:
|
|||
- "traefik.http.routers.pf-secure.rule=Host(`${DOMAIN}`)"
|
||||
- "traefik.http.routers.pf-secure.entrypoints=websecure"
|
||||
- "traefik.http.routers.pf-secure.tls=true"
|
||||
- "traefik.http.routers.pf-secure.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.middlewares.redirecthttps.redirectscheme.scheme=https"
|
||||
- "traefik.http.routers.pf.middlewares=redirecthttps"
|
||||
networks:
|
||||
|
|
@ -84,19 +83,12 @@ services:
|
|||
- "--providers.docker.exposedbydefault=false"
|
||||
- "--entrypoints.web.address=:80"
|
||||
- "--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:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
- "${PROJECT_ROOT}/letsencrypt:/letsencrypt"
|
||||
networks:
|
||||
- web
|
||||
restart: always
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@
|
|||
; project environment (DEVELOP || PRODUCTION).
|
||||
; This effects: DB connection, Mail-Server, SSO, ESI configurations in this file
|
||||
; configuration below
|
||||
SERVER = PRODUCTION
|
||||
SERVER = DEVELOPMENT
|
||||
|
||||
[ENVIRONMENT.PRODUCTION]
|
||||
[ENVIRONMENT.DEVELOPMENT]
|
||||
; path to index.php (Default: leave blank == "auto-detect")
|
||||
; -> e.g. set /pathfinder if your URL looks like https://www.[YOUR_DOMAIN]/pathfinder (subfolder)
|
||||
BASE =
|
||||
; deployment URL (e.g. https://www.pathfinder-w.space)
|
||||
URL = {{@SCHEME}}://$DOMAIN
|
||||
; level of debug/error stack trace
|
||||
DEBUG = 0
|
||||
DEBUG = 3
|
||||
; Pathfinder database
|
||||
DB_PF_DNS = mysql:host=${CONTAINER_NAME}db;port=3306;dbname=
|
||||
DB_PF_NAME = pf
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ fastcgi.logging=0
|
|||
request_terminate_timeout = 300
|
||||
session.save_handler = redis
|
||||
session.save_path = "tcp://${CONTAINER_NAME}-redis:6379"
|
||||
zend_extension=/usr/lib/php7/modules/xdebug.so
|
||||
[Date]
|
||||
date.timezone="UTC"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue