Browse Source

updated the build templates following git repository move and weasyprint fork

pull/160/head
Mike Olund 8 years ago
parent
commit
650966c355
5 changed files with 32 additions and 13 deletions
  1. +10
    -0
      .env.example
  2. +14
    -6
      nginx-proxy/conf.d/server.conf
  3. +1
    -1
      openshift/templates/edivorce-build-template.yaml
  4. +6
    -5
      openshift/templates/edivorce-environment-template.yaml
  5. +1
    -1
      openshift/templates/nginx-build-template.yaml

+ 10
- 0
.env.example View File

@ -0,0 +1,10 @@
LOCAL_DEV=True
DEBUG=True
TEMPLATE_DEBUG=True
DJANGO_SECRET_KEY=
DATABASE_ENGINE=django.db.backends.sqlite3
DATABASE_NAME=db.sqlite3
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_HOST=
DATABASE_PORT=

+ 14
- 6
nginx-proxy/conf.d/server.conf View File

@ -12,10 +12,15 @@ server {
proxy_pass http://edivorce-django:8080;
proxy_pass_request_headers on;
# rewrite 302 redirect responses
# proxy_redirect http://edivorce-django:8080 https://justice.gov.bc.ca;
# rewrite 302 redirect responses to absolute URL's so the justice proxy
# doesn't mangle them by adding double slashes to relative URL's
proxy_redirect http://edivorce-django:8080 https://justice.gov.bc.ca;
# remove directories from incoming requests
# remove directories from incoming requests;
rewrite ^/divorce-dev$ / last;
rewrite ^/divorce-test$ / last;
rewrite ^/divorce$ / last;
rewrite ^/divorce-dev(.*)$ $1 last;
rewrite ^/divorce-test(.*)$ $1 last;
rewrite ^/divorce(.*)$ $1 last;
@ -27,20 +32,23 @@ server {
rewrite ^(.*)//(.*)$ $1/$2;
}
# static rewrite (dev)
# static no rewrite (dev)
location /divorce-dev/static/ {
#todo: add caching
proxy_pass http://edivorce-django:8080;
proxy_pass_request_headers on;
}
# static rewrite (test)
# static no rewrite (test)
location /divorce-test/static/ {
#todo: add caching
proxy_pass http://edivorce-django:8080;
proxy_pass_request_headers on;
}
# static rewrite (prod)
# static no rewrite (prod)
location /divorce/static/ {
#todo: add caching
proxy_pass http://edivorce-django:8080;
proxy_pass_request_headers on;
}


+ 1
- 1
openshift/templates/edivorce-build-template.yaml View File

@ -66,7 +66,7 @@ parameters:
displayName: Git Repository URL
required: true
description: The URL of the repository with your application source code.
value: https://github.com/bcgov/eDivorce.git
value: https://github.com/bcgov/eDivorce
- name: SOURCE_REPOSITORY_REF
displayName: Git Reference
description: Set this to a branch name, tag or other ref of your repository if you are not using the default branch.


+ 6
- 5
openshift/templates/edivorce-environment-template.yaml View File

@ -187,10 +187,10 @@ objects:
tags:
- name: latest
annotations:
openshift.io/imported-from: aquavitae/weasyprint
openshift.io/imported-from: jag-csb-edivorce-tools/weasyprint
from:
kind: DockerImage
name: aquavitae/weasyprint
name: jag-csb-edivorce-tools/weasyprint
- kind: Service
apiVersion: v1
metadata:
@ -216,7 +216,7 @@ objects:
spec:
strategy:
type: Recreate
triggers:
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
@ -224,7 +224,8 @@ objects:
- weasyprint
from:
kind: ImageStreamTag
name: 'aquavitae/weasyprint:latest'
namespace: jag-csb-edivorce-tools
name: 'weasyprint:latest'
replicas: 1
selector:
name: weasyprint
@ -238,7 +239,7 @@ objects:
spec:
containers:
- name: weasyprint
image: 'aquavitae/weasyprint'
image: 'jag-csb-edivorce-tools/weasyprint'
ports:
- containerPort: 5001
protocol: TCP


+ 1
- 1
openshift/templates/nginx-build-template.yaml View File

@ -64,7 +64,7 @@ parameters:
- name: SOURCE_REPOSITORY_URL
displayName: Git Repository URL
description: The URL of the repository with your nginx configuration code.
value: https://github.com/molund/eDivorce
value: https://github.com/bcgov/eDivorce
required: true
- name: SOURCE_REPOSITORY_CONTEXT_DIR
displayName: Git sub-directory


Loading…
Cancel
Save