CICD
This commit is contained in:
@@ -26,6 +26,9 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
db-network:
|
db-network:
|
||||||
§PROJECT_BUILDNAME§-network:
|
§PROJECT_BUILDNAME§-network:
|
||||||
|
nginx-network:
|
||||||
|
aliases:
|
||||||
|
- §PROJECT_BUILDNAME§.§ENVIRONMENT_TYPE§.webserver
|
||||||
links:
|
links:
|
||||||
- mongo:database
|
- mongo:database
|
||||||
volumes:
|
volumes:
|
||||||
@@ -65,6 +68,9 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
db-network:
|
db-network:
|
||||||
§PROJECT_BUILDNAME§-network:
|
§PROJECT_BUILDNAME§-network:
|
||||||
|
nginx-network:
|
||||||
|
name:
|
||||||
|
nginx-network
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
nginx:
|
||||||
|
image: nginx:1.16
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
networks:
|
||||||
|
- nginx-network
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
|
|
||||||
|
|
||||||
|
networks:
|
||||||
|
nginx-network:
|
||||||
|
name:
|
||||||
|
nginx-network
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
worker_processes 1;
|
||||||
|
|
||||||
|
events { worker_connections 1024; }
|
||||||
|
|
||||||
|
http {
|
||||||
|
client_max_body_size 5M;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name www.ifattidinapoli.it preproduction.ifattidinapoli.it default_server;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://fdn2.production.webserver/;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
; server {
|
||||||
|
; listen 80;
|
||||||
|
; server_name test.ifattidinapoli.it;
|
||||||
|
|
||||||
|
; location / {
|
||||||
|
; proxy_pass http://fdn2.test.webserver/;
|
||||||
|
; proxy_redirect off;
|
||||||
|
; proxy_set_header Host $host;
|
||||||
|
; }
|
||||||
|
|
||||||
|
; }
|
||||||
|
|
||||||
|
}
|
||||||
+8
-2
@@ -22,6 +22,7 @@ usage() {
|
|||||||
echo " -u: Unit tests locally" 1>&2;
|
echo " -u: Unit tests locally" 1>&2;
|
||||||
echo " -d: Run debug vesion locally" 1>&2;
|
echo " -d: Run debug vesion locally" 1>&2;
|
||||||
echo " -p: Publish (requires a version)" 1>&2;
|
echo " -p: Publish (requires a version)" 1>&2;
|
||||||
|
echo " -X: Staging Deploy (requires a version)" 1>&2;
|
||||||
echo " -x: Production Deploy (requires a version)" 1>&2;
|
echo " -x: Production Deploy (requires a version)" 1>&2;
|
||||||
echo " -t: Software version, this will be used for the docker tag (default: local)" 1>&2;
|
echo " -t: Software version, this will be used for the docker tag (default: local)" 1>&2;
|
||||||
echo " -v: Verbose" 1>&2;
|
echo " -v: Verbose" 1>&2;
|
||||||
@@ -31,7 +32,8 @@ usage() {
|
|||||||
UNIT_MODE=0
|
UNIT_MODE=0
|
||||||
DEBUG_MODE=0
|
DEBUG_MODE=0
|
||||||
PUBLISH_MODE=0
|
PUBLISH_MODE=0
|
||||||
DEPLOY_MODE=0
|
DEPLOY_TEST_MODE=0
|
||||||
|
DEPLOY_PROD_MODE=0
|
||||||
SELECTED_MODES=0
|
SELECTED_MODES=0
|
||||||
|
|
||||||
TAG="local"
|
TAG="local"
|
||||||
@@ -50,8 +52,12 @@ while getopts "t:hvudpx" o; do
|
|||||||
PUBLISH_MODE=1
|
PUBLISH_MODE=1
|
||||||
SELECTED_MODES+=1
|
SELECTED_MODES+=1
|
||||||
;;
|
;;
|
||||||
|
X)
|
||||||
|
DEPLOY_TEST_MODE=1
|
||||||
|
SELECTED_MODES+=1
|
||||||
|
;;
|
||||||
x)
|
x)
|
||||||
DEPLOY_MODE=1
|
DEPLOY_PROD_MODE=1
|
||||||
SELECTED_MODES+=1
|
SELECTED_MODES+=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user