Skip to content

Commit

Permalink
Publish docker image (#5)
Browse files Browse the repository at this point in the history
* Added action to publish docker image

* Fixes for entrypoint.sh

* Version bump

* CI changes

* Fix
  • Loading branch information
pmanko authored Jan 26, 2022
1 parent e9c6ba2 commit 90e665f
Show file tree
Hide file tree
Showing 7 changed files with 6,803 additions and 32 deletions.
36 changes: 25 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
publish:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -39,6 +39,30 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
uses: docker/build-push-action@v2
with:
context: .
load: true
push: false
tags: test-image:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Pull containers
run: docker-compose pull
continue-on-error: true

- name: Cache containers
uses: satackey/action-docker-layer-caching@v0.0.11
continue-on-error: true

- name: Boot up containers
run: docker-compose up -d mysql openmrs

- name: Wait for OpenMRS
run: docker-compose up --exit-code-from wait wait

- name: Publish Docker image
uses: docker/build-push-action@v2
if: github.event_name == 'release'
Expand All @@ -49,13 +73,3 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

test:
runs-on: ubuntu-latest
steps:
- name: Wait For OpenMRS
uses: I-TECH-UW/wait-for-openmrs-action@v0.3.0
with:
target-url: http://isanteplusdemo.com/openmrs
interval: 10 # default is 1000
timeout: 1000 # default is 1000000
62 changes: 62 additions & 0 deletions conf/mysqld.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This is a pre-configuration for Docker MySQL to allow BinLog and replication necessary configurations for Debezium to work
# see ./openmrs-compose.yaml
# REF: https://github.com/debezium/debezium/blob/master/debezium-connector-mysql/src/test/docker/server-gtids/my.cnf

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
skip-host-cache
skip-name-resolve
datadir=/var/lib/mysql-no-volume
#socket=/var/lib/mysql/mysql.sock
#secure-file-priv=/var/lib/mysql-files
user=mysql

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

#log-error=/var/log/mysqld.log
#pid-file=/var/run/mysqld/mysqld.pid

# ----------------------------------------------
# Enable the binlog for replication & CDC
# ----------------------------------------------

# Enable binary replication log and set the prefix, expiration, and log format.
# The prefix is arbitrary, expiration can be short for integration tests but would
# be longer on a production system. Row-level info is required for ingest to work.
# Server ID is required, but this will vary on production systems
server-id = 223344
log_bin = mysql-bin
expire_logs_days = 1
binlog_format = row
Loading

0 comments on commit 90e665f

Please sign in to comment.