Skip to content

Commit

Permalink
Revert TM to the previous version
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Aug 14, 2024
1 parent fab2b7c commit b083e24
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
29 changes: 11 additions & 18 deletions .github/workflows/frontend-tasking-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
branches:
- 'main'
- 'staging'


jobs:
tm:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,6 +36,7 @@ jobs:
TM_IMPORT_MAX_FILESIZE: 3e+06
AWS_S3_BUCKET: tasks-staging.openhistoricalmap.org
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.STAGING_TM_CLOUDFRONT_DISTRIBUTION_ID }}

- name: Set environment variables - Production
if: github.ref == 'refs/heads/main'
uses: allenevans/[email protected]
Expand All @@ -61,29 +60,23 @@ jobs:
TM_IMPORT_MAX_FILESIZE: 3e+06
AWS_S3_BUCKET: tasks.openhistoricalmap.org
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.PRODUCTION_TM_CLOUDFRONT_DISTRIBUTION_ID }}

- name: Checkout tasking-manager repo
uses: actions/checkout@v4
uses: actions/checkout@v2
with:
repository: OpenHistoricalMap/tasking-manager
ref: c2e85feed9660eb66dfcd2009bec2b049dfe0260
path: tasking-manager
ref: 3902d566d9d2d8d5a9c37bf61894ed649b581ee5
# token: ${{ env.DEV_GITHUB_TOKEN }}

- name: Debug Checkout
run: ls -la tasking-manager

- name: Use Node.js 16
uses: actions/setup-node@v2
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: '16'
node-version: '12'

- name: npm Install
run: |
cd tasking-manager/frontend && npm install && CI=true GENERATE_SOURCEMAP=false npm run build
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
npm install && npm run build
working-directory: frontend

- uses: actions/setup-python@v2
with:
Expand All @@ -97,7 +90,7 @@ jobs:
- name: Sync to S3 and clean cache in cloudfront
if: ${{ success() }}
run: |
aws s3 sync tasking-manager/frontend/build s3://${AWS_S3_BUCKET} --acl public-read --delete
aws s3 sync frontend/build s3://${AWS_S3_BUCKET} --acl public-read --delete
aws cloudfront create-invalidation --distribution-id=${CLOUDFRONT_DISTRIBUTION_ID} --paths=/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
7 changes: 4 additions & 3 deletions images/tasking-manager-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM python:3.8-slim
FROM python:3.7-slim

RUN apt update && \
apt install -y git

ENV workdir /usr/src/app

RUN git clone https://github.com/OpenHistoricalMap/tasking-manager.git $workdir
RUN cd $workdir && git checkout -f c2e85feed9660eb66dfcd2009bec2b049dfe0260
# Commits on 27 April, 2022
RUN cd $workdir && git checkout -f f0df07174f4014365220af09187b5f941f9770b0
WORKDIR $workdir

# Setup backend dependencies
Expand All @@ -29,4 +30,4 @@ RUN pip install --upgrade markdown
## INITIALIZATION
EXPOSE 5000
CMD ["gunicorn", "-b", "0.0.0.0:5000", "--worker-class", "gevent", "--workers", "3", \
"--threads", "3", "--timeout", "179", "manage:application", "&"]
"--threads", "3", "--timeout", "179", "manage:application", "&"]

0 comments on commit b083e24

Please sign in to comment.