Skip to content

Commit

Permalink
workflow updated
Browse files Browse the repository at this point in the history
  • Loading branch information
moeto88 committed Apr 14, 2023
1 parent 3252787 commit 6a15ac7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/openshift_deployment.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: OpenShift

# test

env:
APP_NAME: "architecture-center-input-form"
APP_PORT: 5297
PROJECT_NAME: "moeto88-dev"

OPENSHIFT_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE }}

on:
workflow_run:
Expand Down Expand Up @@ -41,20 +38,20 @@ jobs:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
insecure_skip_tls_verify: true
namespace: ${{ env.PROJECT_NAME }}
namespace: ${{ env.OPENSHIFT_NAMESPACE }}

- name: Create and expose app
id: deploy-and-expose
uses: redhat-actions/oc-new-app@v1
with:
app_name: ${{ env.APP_NAME }}
image: quay.io/moeto88/architecture-center-input-form
namespace: ${{ env.PROJECT_NAME }}
image: quay.io/${{secrets.QUAY_IO_ACCOUNT_NAME}}/architecture-center-input-form
namespace: ${{ env.OPENSHIFT_NAMESPACE }}
port: ${{ env.APP_PORT }}

- name: Set environment
run: |
oc set env deployment.apps/architecture-center-input-form PORT=${{ env.APP_PORT }}
oc set env deployment.apps/architecture-center-input-form PORT=5297
- name: Print application URL
env:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/publish-to-quay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ name: "Publish to Quay.io"
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# documentation

on:
push:
branches:
- main-deployment
tags: [ 'v*.*.*' ]

env:
REGISTRY: quay.io
IMAGE_NAME: moeto88/architecture-center-input-form
IMAGE_NAME: ${{secrets.QUAY_IO_ACCOUNT_NAME}}/architecture-center-input-form
IMAGE_TAGS: ""

jobs:
Expand Down Expand Up @@ -63,4 +64,4 @@ jobs:

- name: Wait for the image changes to propagate on quay.io
run: |
sleep 10
sleep 10
7 changes: 5 additions & 2 deletions .github/workflows/qodana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ on:
workflow_dispatch:
pull_request:
push:
branches: [dev]
branches:
- dev
- main
- main-deployment

jobs:
qodana:
Expand All @@ -23,4 +26,4 @@ jobs:
name: qodana-report

- name: Display structure of downloaded files
run: ls -R
run: ls -R
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ RUN pip3 install --no-cache-dir -r requirements.txt
RUN npm install -global yarn
RUN yarn install


EXPOSE 5297
#EXPOSE 4621

RUN chmod +x start.sh
RUN chmod -R 777 /architecture-center-input-form

RUN chmod +x start.sh
RUN chmod -R 777 /architecture-center-input-form
RUN chmod -R a+rw /architecture-center-input-form/database
RUN chmod -R a+rw /architecture-center-input-form/database/content/images

CMD start.sh
# gunicorn app:app -b 0.0.0.0:5297 -w 8 -k uvicorn.workers.UvicornWorker & yarn dev
# gunicorn app:app -b 0.0.0.0:5297 -w 8 -k uvicorn.workers.UvicornWorker & yarn dev

0 comments on commit 6a15ac7

Please sign in to comment.