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 http://edivorce-django:8080;
proxy_pass_request_headers on; 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-dev(.*)$ $1 last;
rewrite ^/divorce-test(.*)$ $1 last; rewrite ^/divorce-test(.*)$ $1 last;
rewrite ^/divorce(.*)$ $1 last; rewrite ^/divorce(.*)$ $1 last;
@ -27,20 +32,23 @@ server {
rewrite ^(.*)//(.*)$ $1/$2; rewrite ^(.*)//(.*)$ $1/$2;
} }
# static rewrite (dev)
# static no rewrite (dev)
location /divorce-dev/static/ { location /divorce-dev/static/ {
#todo: add caching
proxy_pass http://edivorce-django:8080; proxy_pass http://edivorce-django:8080;
proxy_pass_request_headers on; proxy_pass_request_headers on;
} }
# static rewrite (test)
# static no rewrite (test)
location /divorce-test/static/ { location /divorce-test/static/ {
#todo: add caching
proxy_pass http://edivorce-django:8080; proxy_pass http://edivorce-django:8080;
proxy_pass_request_headers on; proxy_pass_request_headers on;
} }
# static rewrite (prod)
# static no rewrite (prod)
location /divorce/static/ { location /divorce/static/ {
#todo: add caching
proxy_pass http://edivorce-django:8080; proxy_pass http://edivorce-django:8080;
proxy_pass_request_headers on; proxy_pass_request_headers on;
} }


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

@ -66,7 +66,7 @@ parameters:
displayName: Git Repository URL displayName: Git Repository URL
required: true required: true
description: The URL of the repository with your application source code. 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 - name: SOURCE_REPOSITORY_REF
displayName: Git Reference 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. 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: tags:
- name: latest - name: latest
annotations: annotations:
openshift.io/imported-from: aquavitae/weasyprint
openshift.io/imported-from: jag-csb-edivorce-tools/weasyprint
from: from:
kind: DockerImage kind: DockerImage
name: aquavitae/weasyprint
name: jag-csb-edivorce-tools/weasyprint
- kind: Service - kind: Service
apiVersion: v1 apiVersion: v1
metadata: metadata:
@ -216,7 +216,7 @@ objects:
spec: spec:
strategy: strategy:
type: Recreate type: Recreate
triggers:
triggers:
- type: ImageChange - type: ImageChange
imageChangeParams: imageChangeParams:
automatic: true automatic: true
@ -224,7 +224,8 @@ objects:
- weasyprint - weasyprint
from: from:
kind: ImageStreamTag kind: ImageStreamTag
name: 'aquavitae/weasyprint:latest'
namespace: jag-csb-edivorce-tools
name: 'weasyprint:latest'
replicas: 1 replicas: 1
selector: selector:
name: weasyprint name: weasyprint
@ -238,7 +239,7 @@ objects:
spec: spec:
containers: containers:
- name: weasyprint - name: weasyprint
image: 'aquavitae/weasyprint'
image: 'jag-csb-edivorce-tools/weasyprint'
ports: ports:
- containerPort: 5001 - containerPort: 5001
protocol: TCP protocol: TCP


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

@ -64,7 +64,7 @@ parameters:
- name: SOURCE_REPOSITORY_URL - name: SOURCE_REPOSITORY_URL
displayName: Git Repository URL displayName: Git Repository URL
description: The URL of the repository with your nginx configuration code. 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 required: true
- name: SOURCE_REPOSITORY_CONTEXT_DIR - name: SOURCE_REPOSITORY_CONTEXT_DIR
displayName: Git sub-directory displayName: Git sub-directory


Loading…
Cancel
Save