Skip to content

Commit

Permalink
Merge pull request #1 from ministryofjustice/feature/proof-of-concept
Browse files Browse the repository at this point in the history
POC for AAD Group Management
  • Loading branch information
julialawrence authored Oct 19, 2023
2 parents 9565637 + edb96bd commit 13923d6
Show file tree
Hide file tree
Showing 18 changed files with 920 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
__pycache__
*.pyc
*.pyo
*.pyd
.Python
env
pip-log.txt
pip-delete-this-directory.txt
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ celerybeat.pid
.venv
env/
venv/
myenv/
ENV/
env.bak/
venv.bak/
Expand All @@ -149,6 +150,9 @@ dmypy.json
# pytype static type analyzer
.pytype/

# Flask
**/**flask_session

# Cython debug symbols
cython_debug/

Expand All @@ -158,3 +162,9 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# aad secrets
secrets.json

# IDE
**/*.vscode
36 changes: 36 additions & 0 deletions .gthub/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and Push Docker Image

on:
push:
tags:
- '*'

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Build and Push Docker Image
run: |
docker buildx create --use
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/${{ github.repository }}:${{ github.ref }} \
-t ghcr.io/${{ github.repository }}:latest \
-f Dockerfile .
docker buildx stop ${GITHUB_RUN_ID}
env:
DOCKER_CLI_AGGREGATE: 1

- name: Clean up
run: |
docker buildx rm --all
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use an official Python runtime as the base image
FROM python:3.8-slim

# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY ./app /app

# Install any needed packages specified in requirements.txt
RUN pip install --trusted-host pypi.python.org -r requirements.txt

# Make port 80 available to the world outside this container
EXPOSE 80

# Define environment variable
ENV NAME DataAccessManager

# Run app.py when the container launches
CMD ["python", "app.py"]
1 change: 1 addition & 0 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# data-platform-django-proof-of-concept
Loading

0 comments on commit 13923d6

Please sign in to comment.