Skip to content

Commit

Permalink
Merge pull request #331 from uw-it-aca/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jlaney authored Oct 17, 2023
2 parents d3a6d64 + 02c3ebe commit c630ca8
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 35 deletions.
49 changes: 49 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
*.pyc
*.pyo
*.mo
*.db
*.css.map
*.egg
*.egg-info
*.sql.gz

.cache
.project
.idea
.pydevproject
.DS_Store
.Python
.git/
.bin/
.installed.cfg
.venv
.env.sample

Dockerfile*
docker-compose*
node_modules
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib64/
parts/
sdist/
var/
wheels/
logs/
pyvenv.cfg
pip-selfcheck.json
get-pip.py
db.sqlite3

[Bb]in
[Ii]nclude
[Ll]ib
[Ll]ib64
[Ll]ocal
[Ss]cripts

docker/*-values.yml
21 changes: 8 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
ARG DJANGO_CONTAINER_VERSION=1.4.1

FROM gcr.io/uwit-mci-axdd/django-container:${DJANGO_CONTAINER_VERSION} as app-container
FROM us-docker.pkg.dev/uwit-mci-axdd/containers/django-container:${DJANGO_CONTAINER_VERSION} as app-container

USER root
RUN apt-get update && apt-get install mysql-client libmysqlclient-dev -y
RUN apt-get update && apt-get install libpq-dev -y
USER acait

ADD --chown=acait:acait setup.py /app/
ADD --chown=acait:acait requirements.txt /app/
ADD --chown=acait:acait README.md /app/

RUN . /app/bin/activate && pip install -r requirements.txt
RUN . /app/bin/activate && pip install mysqlclient

ADD --chown=acait:acait . /app/
ADD --chown=acait:acait docker/ project/
ADD --chown=acait:acait docker/app_deploy.sh /scripts
ADD --chown=acait:acait docker/ /app/project/
ADD --chown=acait:acait docker/app_start.sh /scripts
RUN chmod u+x /scripts/app_deploy.sh
RUN chmod u+x /scripts/app_start.sh

RUN /app/bin/pip install -r requirements.txt
RUN /app/bin/pip install psycopg2

RUN . /app/bin/activate && pip install nodeenv && nodeenv -p &&\
npm install -g npm && ./bin/npm install less -g

RUN . /app/bin/activate && python manage.py collectstatic --noinput &&\
python manage.py compress -f

FROM gcr.io/uwit-mci-axdd/django-test-container:${DJANGO_CONTAINER_VERSION} as app-test-container
FROM us-docker.pkg.dev/uwit-mci-axdd/containers/django-test-container:${DJANGO_CONTAINER_VERSION} as app-test-container

COPY --from=app-container /app/ /app/
COPY --from=app-container /static/ /static/
19 changes: 8 additions & 11 deletions docker/prod-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,15 @@ externalService:
enabled: true
name: mdot-db-service
type: ClusterIP
serviceAddress: 172.18.0.37
servicePort: 3306
serviceAddress: 172.18.1.206
servicePort: 5432
database:
engine: mysql
engine: postgres
name: mdot_prod
hostname: mdot-db-service
secretName: prod.mdot.uw.edu-sql-secrets
repo: mdot
instance: prod
image:
repository: gcr.io/uwit-mci-axdd/mdot
tag: IMAGE_TAG
memcached:
enabled: false
cronjob:
Expand All @@ -105,7 +102,7 @@ externalSecrets:
enabled: true
secrets:
- name: prod.mdot.uw.edu-secrets
externalKey: axdd/kv/data/mdot/prod/secrets
externalKey: mdot/prod/secrets
data:
- name: admin-authz-group
property: admin-authz-group
Expand All @@ -122,26 +119,26 @@ externalSecrets:
- name: mdot-ux-contact
property: mdot-ux-contact
- name: prod.mdot.uw.edu-sql-secrets
externalKey: axdd/kv/data/mdot/prod/sql-secrets
externalKey: mdot/prod/sql-secrets
data:
- name: username
property: username
- name: password
property: password
- name: prod.mdot.uw.edu-uwca-certs
externalKey: axdd/kv/data/mdot/prod/uwca-certs
externalKey: mdot/prod/uwca-certs
data:
- name: prod.mdot.uw.edu-uwca.cert
property: prod.mdot.uw.edu-uwca.cert
- name: prod.mdot.uw.edu-uwca.key
property: prod.mdot.uw.edu-uwca.key
- name: prod.mdot.uw.edu-ic-cert
externalKey: axdd/kv/data/mdot/prod/ic-certs
externalKey: mdot/prod/ic-certs
data:
- name: prod.mdot.uw.edu-ic.cert
property: prod.mdot.uw.edu-ic.cert
- name: prod.mdot.uw.edu-uw-idp-cert
externalKey: axdd/kv/data/idp-cert
externalKey: idp-cert
data:
- name: uw-idp-cert
property: cert
Expand Down
19 changes: 8 additions & 11 deletions docker/test-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,15 @@ externalService:
enabled: true
name: mdot-db-service
type: ClusterIP
serviceAddress: 172.18.0.37
servicePort: 3306
serviceAddress: 172.18.1.206
servicePort: 5432
database:
engine: mysql
engine: postgres
name: mdot_test
hostname: mdot-db-service
secretName: test.mdot.uw.edu-sql-secrets
repo: mdot
instance: test
image:
repository: gcr.io/uwit-mci-axdd/mdot
tag: IMAGE_TAG
memcached:
enabled: false
cronjob:
Expand All @@ -78,7 +75,7 @@ externalSecrets:
enabled: true
secrets:
- name: test.mdot.uw.edu-secrets
externalKey: axdd/kv/data/mdot/test/secrets
externalKey: mdot/test/secrets
data:
- name: admin-authz-group
property: admin-authz-group
Expand All @@ -95,26 +92,26 @@ externalSecrets:
- name: mdot-ux-contact
property: mdot-ux-contact
- name: test.mdot.uw.edu-sql-secrets
externalKey: axdd/kv/data/mdot/test/sql-secrets
externalKey: mdot/test/sql-secrets
data:
- name: username
property: username
- name: password
property: password
- name: test.mdot.uw.edu-uwca-certs
externalKey: axdd/kv/data/mdot/test/uwca-certs
externalKey: mdot/test/uwca-certs
data:
- name: test.mdot.uw.edu-uwca.cert
property: test.mdot.uw.edu-uwca.cert
- name: test.mdot.uw.edu-uwca.key
property: test.mdot.uw.edu-uwca.key
- name: test.mdot.uw.edu-ic-certs
externalKey: axdd/kv/data/mdot/test/ic-certs
externalKey: mdot/test/ic-certs
data:
- name: test.mdot.uw.edu-ic.cert
property: test.mdot.uw.edu-ic.cert
- name: test.mdot.uw.edu-uw-idp-cert
externalKey: axdd/kv/data/idp-cert
externalKey: idp-cert
data:
- name: uw-idp-cert
property: cert
Expand Down

0 comments on commit c630ca8

Please sign in to comment.