Skip to content

Commit

Permalink
Merge pull request #1616 from unicef/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
ntrncic authored Sep 1, 2021
2 parents 2dd45bb + 2bc12d4 commit 16f7af3
Show file tree
Hide file tree
Showing 527 changed files with 31,590 additions and 11,906 deletions.
55 changes: 55 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ jobs:
steps:
- checkout:
path: ~/code
- run:
name: "Pull Submodule"
command: |
git submodule init
git submodule update --checkout
- setup_remote_docker
- run:
name: Exporting revision number
Expand Down Expand Up @@ -161,6 +166,47 @@ jobs:
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push unicef/etools-prp-polymer:$TAG
build_and_deploy_fe_cluster:
working_directory: ~/code/polymer_cluster
# The primary container is an instance of the first list image listed. Your build commands run in this container.
docker:
- image: node:12.18.3
steps:
- checkout:
path: ~/code
- run:
name: "Pull Submodule"
command: |
git submodule init
git submodule update --checkout
- setup_remote_docker
- run:
name: Exporting revision number
command: |
REVNO=${CIRCLE_SHA1}
BUILDDATE=$(date -u +%F_%T)
sed -i "0,/revNo/s//$REVNO/" package.json
sed -i "0,/bDate/s//$BUILDDATE/" package.json
- run:
name: Install Docker client
command: |
set -x
VER="17.03.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
- run:
name: Building the image
command: |
TAG=${CIRCLE_BRANCH}
docker build -t unicef/etools-prp-cluster-fe:$TAG -f Dockerfile-bundle .
- run:
name: Pushing to Docker Hub
command: |
TAG=${CIRCLE_BRANCH}
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push unicef/etools-prp-cluster-fe:$TAG
workflows:
version: 2
all:
Expand All @@ -173,3 +219,12 @@ workflows:
- master
- staging
- develop
- separate-ip-cluster
- build_and_deploy_fe_cluster:
filters:
branches:
only:
- master
- staging
- develop
- separate-ip-cluster
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ data/
*.bz2

polymer_3/index_dev.html
polymer_cluster/index_dev.html

# k8s secrets
kubernetes/base/secrets.yml
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "polymer_3/src_ts/etools-prp-common"]
path = polymer_3/src_ts/etools-prp-common
url = https://github.com/unicef/etools-prp-common.git
[submodule "polymer_cluster/src_ts/etools-prp-common"]
path = polymer_cluster/src_ts/etools-prp-common
url = https://github.com/unicef/etools-prp-common.git
34 changes: 34 additions & 0 deletions django_api/Dockerfile-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# unicef/etools-prp-base:base-39
FROM python:3.9.6-alpine3.14

RUN apk update
RUN apk add --upgrade apk-tools \
openssl \
ca-certificates \
libmagic \
libxslt \
geos \
gdal \
postgresql-client


# Build-deps
RUN apk add --no-cache --virtual .build-deps --update \
alpine-sdk \
libxml2-dev \
libxslt-dev \
xmlsec-dev \
postgresql-dev \
libffi-dev \
jpeg-dev \
geos-dev \
gdal-dev \
gcc \
g++


# PYTHON
RUN pip install --no-cache-dir --upgrade \
setuptools \
pip \
pipenv
7 changes: 2 additions & 5 deletions django_api/Dockerfile-installed
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# TODO change this to etools-base, if etools Dockerfile-base changes accepted
# See https://github.com/unicef/etools/pull/2716
FROM unicef/etools-prp-base:latest
FROM unicef/etools-prp-base:base-39

ARG env
ENV ENV ${env:-dev}
Expand All @@ -17,8 +15,7 @@ ADD Pipfile .
ADD Pipfile.lock .
RUN pipenv install --dev --system --ignore-pipfile

RUN pip install greenlet==0.4.14
RUN CFLAGS="-I/usr/local/include/python3.7" UWSGI_PROFILE="asyncio" pip install uwsgi==2.0.15
RUN CFLAGS="-I/usr/local/include/python3.9" UWSGI_PROFILE="asyncio"

RUN mkdir -p /data/django_api/logs
RUN mkdir -p /data/uploads
Expand Down
87 changes: 45 additions & 42 deletions django_api/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,50 @@ django-fixture-magic = "*"
isort = "*"

[packages]
aiohttp = "*"
azure-storage = "==0.20.2"
babel = "*"
boto3 = "*"
carto = "*"
cryptography = "<3.4"
django = "<3.0"
django-admin-extra-urls = "*"
django-celery-beat = "*"
django-celery-email = "*"
django-celery-results = "*"
django-cors-headers = "*"
django-cron = "*"
django-environ = "*"
django-extensions = "*"
django-filter = "*"
python-json-logger = "*"
django-leaflet = "*"
django-model-utils = "*"
django-mptt = "*"
django-paintstore = "*"
django-redis-cache = "*"
django-rest-swagger = "*"
django-storages = "==1.6.6"
django-suit = "*"
djangorestframework = "*"
djangorestframework-gis = "*"
djangorestframework-jwt = "*"
drfpasswordless = "*"
newrelic = "*"
openpyxl = "*"
psycopg2-binary = "*"
pycountry = "*"
python-social-auth = "*"
pyrestcli = "*"
requests = "*"
sentry-sdk = "*"
social-auth-app-django = "*"
social-auth-core = "<4.0.2" # pyjtw compatibility
unicef-notification = "*"
weasyprint = "*"
aiohttp = "<=3.7.4.post0"
azure-common = "<=1.1.27"
azure-storage-blob = "<12.0"
azure-storage-common = "<=2.1"
Babel = "<=2.9.1"
boto3 = "<=1.18.24"
carto = "<=1.11.3"
cryptography = "<3.4" # issue with image
django = "<=3.2.6"
django-admin-extra-urls = "<=3.5.1"
django-celery-beat = "<=2.2.1"
django-celery-email = "<=3.0"
django-celery-results = "<=2.2"
django-cors-headers = "<=3.8"
django-cron = "<=0.5.1"
django-environ = "<=0.4.5"
django-extensions = "<=3.1.3"
django-filter = "<=2.4"
django-leaflet = "<=0.28.1"
django-model-utils = "<=4.1.1"
django-mptt = "<=0.12"
django-paintstore = "<=0.2"
django-redis-cache = "<=3.0"
django-rest-swagger = "<=2.2"
django-storages = "<=1.11.1"
djangorestframework = "<=3.12.4"
djangorestframework-gis = "<=0.17"
djangorestframework-simplejwt = "<=4.8"
drfpasswordless = "<=1.5.7"
greenlet = "<=1.1.1"
newrelic = "<=6.8.0.163"
openpyxl = "<=3.0.7"
psycopg2-binary = "<=2.9.1"
pycountry = "<=20.7.3"
python-json-logger = "<=2.0.2"
python-social-auth = "<=0.3.6"
pyrestcli = "<=0.6.11"
requests = "<=2.26"
sentry-sdk = "<=1.3.1"
social-auth-app-django = "<=4.0"
social-auth-core = "<=4.1"
unicef-notification = "<=0.2.1"
uWSGI = "<=2.0.19.1"
weasyprint = "<=53.0"

[requires]
python_version = "3.7"
python_version = "3.9"
Loading

0 comments on commit 16f7af3

Please sign in to comment.