-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yassir Jabbari
committed
Apr 9, 2019
1 parent
94f7aa8
commit 99c9917
Showing
9 changed files
with
570 additions
and
560 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,52 @@ | ||
version: '3' | ||
|
||
services: | ||
exosuite-website-php-fpm: | ||
working_dir: ${STORAGE_PATH}/${WEBSITE_FOLDER_NAME} | ||
build: | ||
context: ./php-fpm | ||
restart: ${RESTART_MODE} | ||
container_name: exosuite-website-php-fpm-${BUILD_NUMBER} | ||
volumes: | ||
- ${WEBSITE_FOLDER_PATH}:${STORAGE_PATH}/${WEBSITE_FOLDER_NAME} | ||
networks: | ||
- zalenium_exosuite-tests | ||
|
||
nginx-website: | ||
hostname: "exosuite.${BUILD_NUMBER}.local" | ||
build: | ||
context: ./server_confs/${ENVIRONMENT}/website | ||
args: | ||
- CONFIG_FILE=exosuite.conf | ||
- FPM_SERVER=exosuite-website-php-fpm-${BUILD_NUMBER} | ||
- ROOT_PATH=${STORAGE_PATH}/${WEBSITE_FOLDER_NAME} | ||
- SERVER_NAME=exosuite.${BUILD_NUMBER}.local | ||
- APP_NAME=app.exosuite.${BUILD_NUMBER}.local | ||
- DB_HOST=exosuite-website-postgres-${BUILD_NUMBER} | ||
container_name: nginx-website-${BUILD_NUMBER} | ||
depends_on: | ||
- exosuite-website-php-fpm | ||
- exosuite-website-postgres | ||
volumes: | ||
- ${WEBSITE_FOLDER_PATH}:${STORAGE_PATH}/${WEBSITE_FOLDER_NAME} | ||
networks: | ||
zalenium_exosuite-tests: | ||
aliases: | ||
- app.exosuite.${BUILD_NUMBER}.local | ||
|
||
exosuite-website-postgres: | ||
image: postgres:11.1-alpine | ||
container_name: exosuite-website-postgres-${BUILD_NUMBER} | ||
environment: | ||
- POSTGRES_DB=exosuite-website | ||
- POSTGRES_USER=exosuite | ||
- POSTGRES_PASSWORD=root | ||
- PGDATA=/var/lib/postgresql/data/pgdata | ||
networks: | ||
- zalenium_exosuite-tests | ||
|
||
networks: | ||
zalenium_exosuite-tests: | ||
external: true | ||
version: '3' | ||
|
||
services: | ||
exosuite-website-php-fpm: | ||
working_dir: ${STORAGE_PATH}/${WEBSITE_FOLDER_NAME} | ||
build: | ||
context: ./php-fpm | ||
restart: ${RESTART_MODE} | ||
container_name: exosuite-website-php-fpm-${BUILD_NUMBER} | ||
volumes: | ||
- ${WEBSITE_FOLDER_PATH}:${STORAGE_PATH}/${WEBSITE_FOLDER_NAME} | ||
networks: | ||
- zalenium_exosuite-tests | ||
|
||
nginx-website: | ||
hostname: "exosuite.${BUILD_NUMBER}.local" | ||
build: | ||
context: ./server_confs/${ENVIRONMENT}/website | ||
args: | ||
- CONFIG_FILE=exosuite.conf | ||
- FPM_SERVER=exosuite-website-php-fpm-${BUILD_NUMBER} | ||
- ROOT_PATH=${STORAGE_PATH}/${WEBSITE_FOLDER_NAME} | ||
- SERVER_NAME=exosuite.${BUILD_NUMBER}.local | ||
- APP_NAME=app.exosuite.${BUILD_NUMBER}.local | ||
- ADMIN_NAME=gandalf.exosuite.${BUILD_NUMBER}.local | ||
- DB_HOST=exosuite-website-postgres-${BUILD_NUMBER} | ||
container_name: nginx-website-${BUILD_NUMBER} | ||
depends_on: | ||
- exosuite-website-php-fpm | ||
- exosuite-website-postgres | ||
volumes: | ||
- ${WEBSITE_FOLDER_PATH}:${STORAGE_PATH}/${WEBSITE_FOLDER_NAME} | ||
networks: | ||
zalenium_exosuite-tests: | ||
aliases: | ||
- app.exosuite.${BUILD_NUMBER}.local | ||
- gandalf.exosuite.${BUILD_NUMBER}.local | ||
|
||
exosuite-website-postgres: | ||
image: postgres:11.1-alpine | ||
container_name: exosuite-website-postgres-${BUILD_NUMBER} | ||
environment: | ||
- POSTGRES_DB=exosuite-website | ||
- POSTGRES_USER=exosuite | ||
- POSTGRES_PASSWORD=root | ||
- PGDATA=/var/lib/postgresql/data/pgdata | ||
networks: | ||
- zalenium_exosuite-tests | ||
|
||
networks: | ||
zalenium_exosuite-tests: | ||
external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
FROM pagespeed/nginx-pagespeed:stable-alpine3.8-ngx1.15 | ||
|
||
ARG CONFIG_FILE | ||
ARG FPM_SERVER | ||
ARG ROOT_PATH | ||
ARG SERVER_NAME | ||
ARG DB_HOST | ||
ARG APP_NAME | ||
|
||
ENV FPM_SERVER $FPM_SERVER | ||
ENV ROOT_PATH $ROOT_PATH | ||
ENV SERVER_NAME $SERVER_NAME | ||
ENV DB_HOST $DB_HOST | ||
ENV APP_NAME $APP_NAME | ||
|
||
RUN apk add gettext | ||
|
||
COPY ${CONFIG_FILE} /etc/nginx/conf.d/default.template | ||
|
||
ADD snippets /etc/nginx/snippets | ||
|
||
RUN envsubst \$FPM_SERVER,\$SERVER_NAME,\$ROOT_PATH,\$APP_NAME < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf | ||
|
||
RUN rm /etc/nginx/conf.d/default.template | ||
|
||
COPY ./nginx.conf /etc/nginx | ||
|
||
COPY pagespeed.conf /etc/nginx | ||
FROM pagespeed/nginx-pagespeed:stable-alpine3.8-ngx1.15 | ||
|
||
ARG CONFIG_FILE | ||
ARG FPM_SERVER | ||
ARG ROOT_PATH | ||
ARG SERVER_NAME | ||
ARG DB_HOST | ||
ARG APP_NAME | ||
ARG ADMIN_NAME | ||
|
||
ENV FPM_SERVER $FPM_SERVER | ||
ENV ROOT_PATH $ROOT_PATH | ||
ENV SERVER_NAME $SERVER_NAME | ||
ENV DB_HOST $DB_HOST | ||
ENV APP_NAME $APP_NAME | ||
ENV ADMIN_NAME $ADMIN_NAME | ||
|
||
RUN apk add gettext | ||
|
||
COPY ${CONFIG_FILE} /etc/nginx/conf.d/default.template | ||
|
||
ADD snippets /etc/nginx/snippets | ||
|
||
RUN envsubst \$FPM_SERVER,\$SERVER_NAME,\$ROOT_PATH,\$APP_NAME < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf | ||
|
||
RUN rm /etc/nginx/conf.d/default.template | ||
|
||
COPY ./nginx.conf /etc/nginx | ||
|
||
COPY pagespeed.conf /etc/nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
|
||
charset utf-8; | ||
|
||
root ${ROOT_PATH}/public; | ||
server_name ${SERVER_NAME} ${APP_NAME}; | ||
index index.php; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php?$query_string; | ||
} | ||
|
||
location ~ \.php$ { | ||
include snippets/fastcgi-php.conf; | ||
fastcgi_pass ${FPM_SERVER}:9000; | ||
} | ||
include pagespeed.conf; | ||
} | ||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
charset utf-8; | ||
root ${ROOT_PATH}/public; | ||
server_name ${SERVER_NAME} ${APP_NAME} ${ADMIN_NAME}; | ||
index index.php; | ||
location / { | ||
try_files $uri $uri/ /index.php?$query_string; | ||
} | ||
location ~ \.php$ { | ||
include snippets/fastcgi-php.conf; | ||
fastcgi_pass ${FPM_SERVER}:9000; | ||
} | ||
include pagespeed.conf; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
FROM crunchgeek/nginx-pagespeed | ||
|
||
ENV NGINX_PAGESPEED=on | ||
ENV NGINX_PAGESPEED_IMG=false | ||
ENV NGINX_PAGESPEED_JS=false | ||
ENV NGINX_PAGESPEED_CSS=on | ||
ENV NGINX_FASTCGI_GEOIP=on | ||
|
||
COPY exosuite.conf /etc/nginx/conf.d/default.conf | ||
COPY api.exosuite.conf /etc/nginx/conf.d/api.conf | ||
|
||
ADD snippets /etc/nginx/snippets | ||
FROM crunchgeek/nginx-pagespeed | ||
|
||
ENV NGINX_PAGESPEED=on | ||
ENV NGINX_PAGESPEED_IMG=false | ||
ENV NGINX_PAGESPEED_JS=false | ||
ENV NGINX_PAGESPEED_CSS=on | ||
ENV NGINX_FASTCGI_GEOIP=on | ||
|
||
COPY exosuite.conf /etc/nginx/conf.d/default.conf | ||
COPY api.exosuite.conf /etc/nginx/conf.d/api.conf | ||
|
||
ADD snippets /etc/nginx/snippets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
|
||
charset utf-8; | ||
|
||
root /var/www/exosuite-website/public; | ||
server_name exosuite.local app.exosuite.local admin.exosuite.local; | ||
index index.php; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php?$query_string; | ||
} | ||
|
||
location ~ \.php$ { | ||
include snippets/fastcgi-php.conf; | ||
fastcgi_pass exosuite-website-php-fpm:9000; | ||
} | ||
} | ||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
charset utf-8; | ||
root /var/www/exosuite-website/public; | ||
server_name exosuite.local app.exosuite.local gandalf.exosuite.local; | ||
index index.php; | ||
location / { | ||
try_files $uri $uri/ /index.php?$query_string; | ||
} | ||
location ~ \.php$ { | ||
include snippets/fastcgi-php.conf; | ||
fastcgi_pass exosuite-website-php-fpm:9000; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
server { | ||
listen 80; | ||
|
||
server_name exosuite.local app.exosuite.local admin.exosuite.local; | ||
|
||
location / { | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://nginx-website; | ||
} | ||
} | ||
server { | ||
listen 80; | ||
server_name exosuite.local app.exosuite.local gandalf.exosuite.local; | ||
location / { | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://nginx-website; | ||
} | ||
} |