File tree Expand file tree Collapse file tree 6 files changed +37
-10
lines changed
Expand file tree Collapse file tree 6 files changed +37
-10
lines changed Original file line number Diff line number Diff line change 6262 # See https://github.com/developmentseed/titiler/discussions/387
6363 platforms : linux/amd64
6464 context : .
65- file : dockerfiles/Dockerfile.gunicorn
65+ file : dockerfiles/Dockerfile.uvicorn
6666 push : false
6767 tags : " titiler:dev"
6868
7575 if : steps.list-changed.outputs.changed == 'true'
7676
7777 - name : Run chart-testing (install)
78- run : ct install --chart-dirs deployment/k8s
78+ run : ct install --chart-dirs deployment/k8s
Original file line number Diff line number Diff line change @@ -132,7 +132,34 @@ jobs:
132132 id : tag
133133 # https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
134134 run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
135+ # Uvicorn
136+ # Push `latest` when commiting to master
137+ - name : Build and push uvicorn
138+ if : github.ref == 'refs/heads/master'
139+ uses : docker/build-push-action@v2
140+ with :
141+ # See https://github.com/developmentseed/titiler/discussions/387
142+ platforms : linux/amd64
143+ context : .
144+ file : dockerfiles/Dockerfile.uvicorn
145+ push : true
146+ tags : |
147+ ghcr.io/${{ github.repository }}-uvicorn:latest
148+
149+ # Push `{VERSION}` when pushing a new tag
150+ - name : Build and push uvicorn
151+ if : startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
152+ uses : docker/build-push-action@v2
153+ with :
154+ # See https://github.com/developmentseed/titiler/discussions/387
155+ platforms : linux/amd64
156+ context : .
157+ file : dockerfiles/Dockerfile.uvicorn
158+ push : true
159+ tags : |
160+ ghcr.io/${{ github.repository }}-uvicorn:${{ steps.tag.outputs.tag }}
135161
162+ # Gunicorn
136163 # Push `latest` when commiting to master
137164 - name : Build and push
138165 if : github.ref == 'refs/heads/master'
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v1
22appVersion : 0.7.1
33description : A dynamic Web Map tile server
44name : titiler
5- version : 1.0 .0
5+ version : 1.1 .0
66icon : https://raw.githubusercontent.com/developmentseed/titiler/master/docs/logos/TiTiler_logo_small.png
77maintainers :
88 - name : emmanuelmathot # Emmanuel Mathot
Original file line number Diff line number Diff line change 22replicaCount : 1
33
44image :
5- repository : ghcr.io/developmentseed/titiler
5+ repository : ghcr.io/developmentseed/titiler-uvicorn
66 tag : latest
77 pullPolicy : IfNotPresent
88
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ RUN pip install /tmp/titiler/core /tmp/titiler/mosaic /tmp/titiler/application -
1717RUN rm -rf /tmp/titiler
1818
1919ENV MODULE_NAME titiler.application.main
20- ENV VARIABLE_NAME app
20+ ENV VARIABLE_NAME app
Original file line number Diff line number Diff line change 11# Dockerfile for running titiler application with uvicorn server
2- # Size ~600MB
32ARG PYTHON_VERSION=3.9
43
5- FROM python:${PYTHON_VERSION}-slim
6-
7- RUN apt-get update && apt-get install curl -y
4+ FROM bitnami/python:${PYTHON_VERSION}
5+ RUN apt update && apt upgrade -y \
6+ && apt install curl -y \
7+ && rm -rf /var/lib/apt/lists/*
88
99# Ensure root certificates are always updated at evey container build
1010# and curl is using the latest version of them
@@ -20,4 +20,4 @@ RUN rm -rf /tmp/titiler
2020
2121ENV HOST 0.0.0.0
2222ENV PORT 80
23- CMD uvicorn titiler.application.main:app --host ${HOST} --port ${PORT}
23+ CMD uvicorn titiler.application.main:app --host ${HOST} --port ${PORT}
You can’t perform that action at this time.
0 commit comments