Skip to content

Commit

Permalink
Put nginx in separate repository
Browse files Browse the repository at this point in the history
  • Loading branch information
filipopo committed Dec 12, 2024
1 parent a4faa09 commit cd395be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,19 @@ jobs:

- name: Build and push Docker images
run: |
IMAGE=filipmania/urlshortener
ACC=filipmania
IMAGE=${ACC}/urlshortener
docker build -t ${IMAGE}:${GITHUB_RUN_ID} -t ${IMAGE}:latest .
docker push ${IMAGE}:${GITHUB_RUN_ID}
docker push ${IMAGE}:latest
docker build --build-arg BUILD=mssql -t ${IMAGE}:${GITHUB_RUN_ID}-mssql -t ${IMAGE}:latest-mssql .
docker build --build-arg BUILD=mssql -t ${IMAGE}:${GITHUB_RUN_ID}-mssql -t ${IMAGE}:mssql .
docker push ${IMAGE}:${GITHUB_RUN_ID}-mssql
docker push ${IMAGE}:latest-mssql
docker push ${IMAGE}:mssql
docker build --build-arg BUILD=nginx -t ${IMAGE}:${GITHUB_RUN_ID}-nginx -t ${IMAGE}:latest-nginx .
docker build --build-arg BUILD=nginx -t ${IMAGE}:${GITHUB_RUN_ID}-nginx -t ${IMAGE}:nginx .
docker push ${IMAGE}:${GITHUB_RUN_ID}-nginx
docker push ${IMAGE}:latest-nginx
docker build -t ${IMAGE}:nginx -f compose/Dockerfile compose
docker push ${IMAGE}:nginx
- name: Save the IMAGE_TAG
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ There are several options for installing the app, here is a non exhaustive list:

For this approach you will need Docker: https://www.docker.com

Running `docker compose up` will build the Dockerfile in the current directory and start 3 containers, the python app, a mssql database and an nginx static file server
Running `docker compose up` will build the Dockerfile in the current directory and start 3 containers, the python app, a mssql database and an nginx static file server (available at `filipmania/nginx:latest`)

Alternatively, you can run just the python app:

Expand All @@ -159,7 +159,7 @@ There are several options for installing the app, here is a non exhaustive list:

If you're building for the cloud, make sure you build for the right platform e.g `--platform linux/amd64` and if you're building for mssql include `--build-arg BUILD=mssql`

A version with nginx baked into one container is available with `--build-arg BUILD=mssql`. allowing for `DJANGO_DEBUG=false` in a minimal setup. Prebuilt images with these arguments are also available e.g `filipmania/urlshortener:latest-mssql`
A version with nginx baked into one container is available with `--build-arg BUILD=nginx`. allowing for `DJANGO_DEBUG=false` in a minimal setup. Prebuilt images with these arguments are also available e.g `filipmania/urlshortener:mssql`
</details>

<details>
Expand Down

0 comments on commit cd395be

Please sign in to comment.