Skip to content

Commit

Permalink
chore: merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nsantacruz committed Nov 28, 2023
2 parents 0597261 + 3b065a5 commit d41f35e
Show file tree
Hide file tree
Showing 60 changed files with 2,544 additions and 675 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/continuous.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: Continuous
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

concurrency:
group: ${{ github.ref }}
Expand Down Expand Up @@ -93,6 +89,8 @@ jobs:
# cache-to: type=registry,ref=gcr.io/${{ secrets.DEV_PROJECT }}/sefaria-${{ matrix.app }}/cache, mode=max
context: .
push: true
build-args: |
TYPE=build
file: ./build/${{ matrix.app }}/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/production-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ jobs:
# cache-to: type=registry,ref=$gcr.io/${{ secrets.PROD_GKE_PROJECT }}/{{ secrets.IMAGE_NAME }}-${{ matrix.app }}/cache,mode=max
context: .
push: true
build-args: |
TYPE=build-prod
file: ./build/${{ matrix.app }}/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down Expand Up @@ -218,7 +220,6 @@ jobs:
IMAGE_NAME: "${{ secrets.IMAGE_NAME }}"
CHART_VERSION: "${{ steps.chart_version.outputs.chart_version }}"
- name: Update workflow default chart
if: github.ref == 'refs/heads/master'
run: >
curl -L
-X PATCH
Expand Down
2 changes: 1 addition & 1 deletion README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ If the server isn't running, you may need to run `docker-compose up` again.
#### Run locally
#### 1) Install Python 3.7

*We Recommend using the latest Python 3.7 as opposed to later versions of Python (esp 3.10 and up) since it has been known to cause some compatability issues. These are solvable, but for an easier install experience, we currently recommend 3.7*
*We Recommend using the latest Python 3.7 as opposed to later versions of Python (esp 3.10 and up) since it has been known to cause some compatibility issues. These are solvable, but for an easier install experience, we currently recommend 3.7*

###### Linux and macOS
Most UNIX systems come with a python interpreter pre-installed. However, this is generally still Python 2. The recommended way to get Python 3, and not mess up any software the OS is dependent on, is by using Pyenv. You can use the instructions [here](https://github.com/pyenv/pyenv#installation) and also [here](https://opensource.com/article/19/5/python-3-default-mac#what-we-should-do).
Expand Down
2 changes: 1 addition & 1 deletion build/ci/production-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ secrets:
slackWebhook:
ref: slack-webhook-production
instrumentation:
enabled: true
enabled: false
otelEndpoint: "http://otel-collector-collector.monitoring:4317"
jaegerEndpoint: "jaeger-agent-dev.monitoring.svc.cluster.local:6831"

Expand Down
3 changes: 2 additions & 1 deletion build/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM gcr.io/production-deployment/base-node:v13.0.0
ARG TYPE=build-prod

WORKDIR /app/

Expand All @@ -7,7 +8,7 @@ RUN npm install --unsafe-perm

COPY ./node /app/node
COPY ./static/js /app/static/js
RUN npm run build-prod
RUN npm run $TYPE

COPY . /app/
EXPOSE 3000
Expand Down
3 changes: 2 additions & 1 deletion build/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM gcr.io/production-deployment/base-web:v3.7-bullseye
ARG TYPE=build-prod

WORKDIR /app/
# Copied separately to allow for caching of the `pip install` build step
Expand All @@ -10,7 +11,7 @@ RUN npm install --unsafe-perm

COPY ./node /app/node
COPY ./static/js /app/static/js
RUN npm run build-prod
RUN npm run $TYPE

COPY . /app/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ data:
sleep 2
done
until mongodump --uri="$URI" -v -d $DATABASE --excludeCollection=history --excludeCollection=texts --excludeCollection=sheets --excludeCollection=links --excludeCollection=user_history -o "${DATADIR}/dump"
until mongodump --uri="$URI" -v -d $DATABASE --excludeCollection=history --excludeCollection=texts --excludeCollection=sheets --excludeCollection=links --excludeCollection=django_cache --excludeCollection=user_history -o "${DATADIR}/dump"
do
echo "trying to dump other stuff again"
sleep 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
{{- include "sefaria.labels" . | nindent 4 }}
annotations:
helm.sh/hook: post-delete
helm.sh/hook-delete-policy: hook-succeeded
helm.sh/hook-delete-policy: hook-succeeded, hook-failed
helm.sh/hook-weight: "5"
data:
destroy-mongo.sh: |-
Expand Down Expand Up @@ -37,8 +37,14 @@ data:
DB_NAME=$SEFARIA_DB
{{ end }}
URI="${URI}${MONGO_HOST}/${DATABASE}?ssl=false&authSource=admin"
echo "APSCHEDULER: ${APSCHEDULER_NAME}"
if [[ -z "$APSCHEDULER_NAME" ]]; then
APSCHEDULER_NAME={{ tpl .Values.localSettings.APSCHEDULER_NAME . | quote }}
fi
APSCHEDULER_URI="${URI}${MONGO_HOST}/${APSCHEDULER_NAME}?ssl=false&authSource=admin"
URI="${URI}${MONGO_HOST}/${DB_NAME}?ssl=false&authSource=admin"
if [[ ! -z "$MONGO_REPLICASET_NAME" ]]; then
URI="${URI}&replicaSet=${MONGO_REPLICASET_NAME}"
Expand Down
Loading

0 comments on commit d41f35e

Please sign in to comment.