Skip to content

Commit

Permalink
Merge pull request #5 from IsantePlus/pmanko-patch-isanteplus-version…
Browse files Browse the repository at this point in the history
…-bump

Bumped iSantePlus to v2.2.1
  • Loading branch information
pmanko committed Jan 31, 2022
2 parents 61c4b99 + 05685b4 commit 8613ce2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
3 changes: 0 additions & 3 deletions .env

This file was deleted.

7 changes: 6 additions & 1 deletion .github/workflows/build-and-deploy.yml
Expand Up @@ -8,6 +8,9 @@ on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
workflow_dispatch:

env:
Expand Down Expand Up @@ -45,4 +48,6 @@ jobs:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=user/app:latest
cache-to: type=inline
23 changes: 14 additions & 9 deletions Dockerfile
@@ -1,29 +1,32 @@
# Customized from official MySQL Dockerfile and docker-entrypoint.sh:
# https://github.com/docker-library/mysql/tree/c506174eab8ae160f56483e8d72410f8f1e1470f/8.0
FROM alpine/git as download
FROM maven:3.6-jdk-8 as download

WORKDIR /

ARG ISANTEPLUS_VERSION=v2.0.2
ARG ISANTEPLUS_VERSION=v2.2.1

RUN git clone --depth 1 --branch $ISANTEPLUS_VERSION https://github.com/IsantePlus/openmrs-distro-isanteplus.git

WORKDIR /db
WORKDIR /openmrs-distro-isanteplus

RUN mvn generate-resources

RUN mv /openmrs-distro-isanteplus/package/src/main/resources/isanteplus-concepts.sql /db/02.sql
WORKDIR /db

RUN mv /openmrs-distro-isanteplus/package/src/main/resources/initial-db.sql /db/01.sql
RUN mv /openmrs-distro-isanteplus/package/src/main/resources/openmrs-distro.sql /db

FROM debian:buster-slim as db

# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN groupadd -r mysql && useradd -r -g mysql mysql

RUN apt-get update && apt-get install -y --no-install-recommends gnupg dirmngr && rm -rf /var/lib/apt/lists/*

# add gosu for easy step-down from root
# https://github.com/tianon/gosu/releases
ENV GOSU_VERSION 1.12
ENV GOSU_VERSION 1.14
RUN set -eux; \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
Expand All @@ -44,6 +47,8 @@ RUN set -eux; \
gosu --version; \
gosu nobody true

RUN mkdir /docker-entrypoint-initdb.d

COPY --from=download /db/* /docker-entrypoint-initdb.d/

RUN apt-get update && apt-get install -y --no-install-recommends \
Expand All @@ -62,8 +67,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

RUN set -ex; \
# gpg: key 5072E1F5: public key "MySQL Release Engineering <mysql-build@oss.oracle.com>" imported
key='A4A9406876FCBD3C456770C88C718D3B5072E1F5'; \
# gpg: key 3A79BD29: public key "MySQL Release Engineering <mysql-build@oss.oracle.com>" imported
key='859BE8D7C586F538430B19C2467B942D3A79BD29'; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \
gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/mysql.gpg; \
Expand All @@ -72,7 +77,7 @@ RUN set -ex; \
apt-key list > /dev/null

ENV MYSQL_MAJOR 5.7
ENV MYSQL_VERSION 5.7.36-1debian10
ENV MYSQL_VERSION 5.7.37-1debian10

RUN echo 'deb http://repo.mysql.com/apt/debian/ buster mysql-5.7' > /etc/apt/sources.list.d/mysql.list

Expand Down
20 changes: 6 additions & 14 deletions docker-compose.yaml
@@ -1,14 +1,15 @@
version: '3.8'
services:
mysql:
image: ghcr.io/isanteplus/docker-isanteplus-db:latest
build:
context: ./
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci --sql_mode=""
restart: unless-stopped
container_name: isanteplus-mysql
hostname: isanteplus-mysql
ports:
- "${MYSQL_PORT}:3306"
- "3306:3306"
healthcheck:
test: "exit 0"
environment:
Expand All @@ -19,17 +20,15 @@ services:
- MYSQL_ROOT_HOST=% # Allow docker containers to connect to mysql
volumes:
- ./resources/mysql.cnf:/etc/mysql/conf.d/custom.cnf # mysql config preconfigured to allow binlog/debezium
- data:/var/lib/mysql
networks:
- isanteplus
- /var/lib/mysql

isanteplus:
restart: unless-stopped
image: some
image: ghcr.io/isanteplus/docker-isanteplus-server:latest
container_name: isanteplus
hostname: isanteplus
ports:
- "${ISANTEPLUS_PORT}:8080"
- "8080:8080"
healthcheck:
test: "exit 0"
environment:
Expand All @@ -47,14 +46,7 @@ services:
JPDA_TRANSPORT: dt_socket
OMRS_DEV_DEBUG_PORT: 8000
volumes:
- openmrs-data:/openmrs/data
networks:
- isanteplus
- /openmrs/data

networks:
isanteplus:
volumes:
data:
openmrs-data:


0 comments on commit 8613ce2

Please sign in to comment.