Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI process #723

Merged
merged 3 commits into from
Mar 19, 2024
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
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM clojure:lein-2.8.1 AS build
FROM clojure:lein-2.8.1 AS base

RUN echo 'deb http://archive.debian.org/debian stretch main\n\
deb http://archive.debian.org/debian-security stretch/updates main' > /etc/apt/sources.list
Expand All @@ -15,6 +15,8 @@ RUN apt update && \

WORKDIR /app

FROM base as build

COPY . /app

RUN cd client && npm install && npm run release
Expand All @@ -27,13 +29,10 @@ RUN echo 'deb http://archive.debian.org/debian stretch main\n\
deb http://archive.debian.org/debian-security stretch/updates main' > /etc/apt/sources.list

# Install package dependencies and add precompiled binary
RUN for i in {1..5}; do \
(apt-get update \
&& apt-get -y install postgresql-client gdal-bin python-gdal libgdal-java \
&& break) \
|| (sleep 5; false); done \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get -y install postgresql-client gdal-bin python-gdal libgdal-java && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Add scripts
COPY --from=build /app/scripts/ /app/scripts/
Expand Down
16 changes: 0 additions & 16 deletions Dockerfile-dev

This file was deleted.

4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ if [[ -z "$DOCKER_TAG" ]]; then
fi

dockerBuildAndPush
dockerBuildAndPush -d mapserver -s "-mapserver" -t "-mapserver" -o "-f mapserver/Dockerfile.mapserver"
dockerBuildAndPush -d mapserver -s "-mapserver" -t "-mapcache" -o "-f mapserver/Dockerfile.mapcache"
dockerBuildAndPush -d mapserver -s "-mapserver" -o "-f mapserver/Dockerfile.mapserver"
dockerBuildAndPush -d mapserver -s "-mapcache" -o "-f mapserver/Dockerfile.mapcache"
dockerBuildAndPush -d scripts -s "-tools"
4 changes: 2 additions & 2 deletions docker-cloud.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ web:
- mapserver-data

mapcache:
image: instedd/planwise-mapserver:kenya-mapcache
image: instedd/planwise-mapcache:kenya
autorestart: always
autoredeploy: true

mapserver:
image: instedd/planwise-mapserver:kenya-mapserver
image: instedd/planwise-mapserver:kenya
autorestart: always
autoredeploy: true
volumes_from:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ services:

mapcache:
container_name: planwise-prod-mapcache
image: instedd/planwise-mapserver:kenya-mapcache
image: instedd/planwise-mapcache:kenya
pid: host

mapserver:
container_name: planwise-prod-mapserver
image: instedd/planwise-mapserver:kenya-mapserver
image: instedd/planwise-mapserver:kenya
pid: host
volumes:
- data:/data
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ version: '2'
services:
app:
build:
dockerfile: Dockerfile-dev
context: .
target: base
platform: linux/amd64
volumes:
- ".:/app"
Expand All @@ -21,8 +21,8 @@ services:

client:
build:
dockerfile: Dockerfile-dev
context: .
target: base
platform: linux/amd64
volumes:
- ".:/app"
Expand Down
19 changes: 0 additions & 19 deletions mapserver/build-and-push.sh

This file was deleted.

4 changes: 2 additions & 2 deletions mapserver/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mapcache:
image: instedd/planwise-mapserver:mapcache
image: instedd/planwise-mapcache
# build: .
# dockerfile: Dockerfile.mapcache
volumes:
Expand All @@ -10,7 +10,7 @@ mapcache:
- "5002:80"

mapserver:
image: instedd/planwise-mapserver:mapserver
image: instedd/planwise-mapserver
# build: .
# dockerfile: Dockerfile.mapserver
volumes:
Expand Down