-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from mjanez/main
Fix docker-compose files and add docker-dev workflow
- Loading branch information
Showing
4 changed files
with
99 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Docker | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- latest | ||
tags: | ||
- 'v*.*.*' | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }}-dev | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
- | ||
name: Login to registry | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM ghcr.io/mjanez/ckan-ogc:latest | ||
LABEL maintainer="mnl.janez@gmail.com" | ||
|
||
ENV APP_DIR=/app | ||
ENV TZ=UTC | ||
RUN echo ${TZ} > /etc/timezone | ||
ENV CKAN_URL=http://localhost:5000/ | ||
ENV PYCSW_URL=http://localhost:8000/ | ||
ENV CKAN_API_KEY=ckan-api-key | ||
ENV DEFAULT_LICENSE=http://creativecommons.org/licenses/by/4.0/ | ||
ENV DEFAULT_LICENSE_ID=cc-by | ||
ENV DEV_MODE=False | ||
ENV TIMEOUT=300 | ||
ENV SSL_UNVERIFIED_MODE=False | ||
|
||
WORKDIR ${APP_DIR} | ||
COPY pyproject.toml pdm.lock . | ||
|
||
RUN pdm install --no-self --group prod | ||
|
||
COPY ckan-ogc/conf/config.yaml.template config.yaml | ||
COPY ckan-ogc/entrypoint.sh entrypoint.sh | ||
COPY ogc2ckan ogc2ckan | ||
COPY data data | ||
|
||
ENTRYPOINT ["/bin/bash", "./entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: ckan-ogc | ||
version: "3" | ||
|
||
services: | ||
ogc2ckan: | ||
container_name: ckan-ogc-dev | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: "3" | ||
|
||
services: | ||
ogc2ckan: | ||
container_name: ckan-ogc | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.ghcr | ||
env_file: | ||
- .env | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "100m" | ||
max-file: "10" | ||
volumes: | ||
- ./log:${APP_DIR}/log | ||
- ./metadata:${APP_DIR}/metadata | ||
restart: on-failure:3 | ||
network_mode: host |