diff --git a/.github/workflows/thepercyj-esrs-group-9-main-example-environment-branch-workflow.yml b/.github/workflows/thepercyj-esrs-group-9-main-example-environment-branch-workflow.yml deleted file mode 100644 index d80de1b..0000000 --- a/.github/workflows/thepercyj-esrs-group-9-main-example-environment-branch-workflow.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Architect main Branch Deployment - -on: - push: - branches: - - main - -env: - ARCHITECT_GENERATED: true - ARCHITECT_BRANCH: true - COMPONENT_FILE_PATH: architect.yml - ARCHITECT_ACCOUNT: thepercyj - COMPONENT_NAME: esrs-group-9 - ENVIRONMENT_NAME: example-environment - BRANCH_NAME: main - CLUSTER_NAME: architect - -jobs: - architect_create_branch_deployments: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ env.BRANCH_NAME }} - - uses: actions/setup-node@v3 - with: - node-version: '16' - - uses: crazy-max/ghaction-github-runtime@v2 # Exports internal envs for Github Actions. Required for register caching to work. - - name: Install Architect CLI - run: npm install -g @architect-io/cli - - name: Login to Architect Cloud - run: architect login -e ${{ secrets.ARCHITECT_EMAIL }} -p ${{ secrets.ARCHITECT_PASSWORD }} # These secrets were created on your behalf - - name: Register component w/ Architect - run: architect register ${{ env.COMPONENT_FILE_PATH }} -t latest - - name: An environment created automatically by a GitHub branch workflow to facilitate automated component deployments - run: architect environment:create --cluster=${{ env.CLUSTER_NAME }} --description="Architect workflow environment" ${{ env.ENVIRONMENT_NAME }} - - name: Deploy component - run: architect deploy --auto-approve -e ${{ env.ENVIRONMENT_NAME }} ${{ env.COMPONENT_NAME }}:latest diff --git a/Dockerfile b/Dockerfile index 9bcc762..bbcfa05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,16 +4,22 @@ # We Use an official Python runtime as a parent image FROM python:3.9.13 +WORKDIR /usr/src/app + +ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONUNBUFFERED 1 + # Allows docker to cache installed dependencies between builds -COPY Bingle/requirements.txt requirements.txt +RUN pip install --upgrade pip +COPY Bingle/requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Mounts the application code to the image -COPY . app -WORKDIR /app +COPY . . + EXPOSE 8000 # runs the production server ENTRYPOINT ["python", "Bingle/manage.py"] -CMD ["runserver", "0.0.0.0:8000d"] \ No newline at end of file +CMD ["runserver", "0.0.0.0:8000"] \ No newline at end of file diff --git a/architect.yml b/architect.yml deleted file mode 100644 index e40d924..0000000 --- a/architect.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: esrs-group-9 -services: - web: - build: - context: .. - dockerfile: ./Dockerfile - interfaces: - main: - port: 8000 - debug: - volumes: - volume: - host_path: . - mount_path: /app - reserved_name: web diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..aad2ff6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' + +services: + web: + build: + context: . + dockerfile: Dockerfile + ports: + - "8000:8000" + volumes: + - .:/usr/src/app \ No newline at end of file