Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/docker-build-publish-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and Publish Docker Image for Preview

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: c2dhunilu/journal-of-digital-history-backend:preview
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12-alpine
FROM python:3.8-alpine
WORKDIR /journal-of-digital-history-backend

ARG GIT_TAG
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ run-dev:
pipenv run ./manage.py runserver 8889

build-docker-image:
docker build \
docker buildx build \
--platform=linux/amd64 \
-t c2dhunilu/journal-of-digital-history-backend:${BUILD_TAG} \
--push \
--build-arg GIT_TAG=$(shell git describe --tags) \
--build-arg GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
--build-arg GIT_REVISION=$(shell git rev-parse --short HEAD) .
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ notebook==6.2.0
packaging==21.3
Pillow==10.1.0
prompt-toolkit==3.0.8
psycopg2-binary==2.8.6
psycopg2-binary==2.9.7
pycountry==22.3.5
pyrsistent==0.17.3
pytz==2020.4
Expand Down