-
-
Notifications
You must be signed in to change notification settings - Fork 580
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
247 changed files
with
120,843 additions
and
107 deletions.
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
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
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
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,31 @@ | ||
FROM alpine:3.7 | ||
|
||
ENV MYSQL_DATABASE db | ||
ENV MYSQL_USER db | ||
ENV MYSQL_PASSWORD db | ||
ENV MYSQL_ROOT_PASSWORD root | ||
ENV MARIADB_VERSION 10.1 | ||
|
||
# Install mariadb and other packages | ||
RUN apk add --no-cache mariadb mariadb-client bash tzdata shadow sudo | ||
# Remove the installed version as we need to set up our own from scratch | ||
|
||
RUN rm -rf /var/lib/mysql/* /etc/mysql | ||
RUN mkdir -p /var/lib/mysql && chmod 777 /var/lib/mysql | ||
|
||
ADD files / | ||
|
||
RUN chmod ugo+x /healthcheck.sh | ||
|
||
# Security-sensitive changes: Make sure our start script can do what is needed | ||
# But make sure these are right | ||
RUN chmod ugo+wx /mnt /var/tmp | ||
RUN chmod -R ugo+wx /var/log /var/tmp/mysqlbase /etc/mysql/conf.d | ||
RUN ln -s /dev/stderr /var/log/mysqld.err | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
EXPOSE 3306 | ||
# The following line overrides any cmd entry | ||
CMD [] | ||
HEALTHCHECK --interval=2s --retries=30 CMD ["/healthcheck.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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Makefile for a standard repo with associated container | ||
|
||
##### These variables need to be adjusted in most repositories ##### | ||
|
||
# This repo's root import path (under GOPATH). | ||
# PKG := github.com/drud/repo_name | ||
|
||
# Docker repo for a push | ||
DOCKER_REPO ?= drud/ddev-dbserver | ||
|
||
MARIADB_VERSION=10.1 | ||
|
||
# Upstream repo used in the Dockerfile | ||
# UPSTREAM_REPO ?= oraclelinux:7.3 | ||
|
||
# Top-level directories to build | ||
#SRC_DIRS := files drudapi secrets utils | ||
|
||
# Optional to docker build | ||
# DOCKER_ARGS = --build-arg MYSQL_PACKAGE_VERSION=5.7.17-1 | ||
|
||
|
||
# VERSION can be set by | ||
# Default: git tag | ||
# make command line: make VERSION=0.9.0 | ||
# It can also be explicitly set in the Makefile as commented out below. | ||
|
||
# This version-strategy uses git tags to set the version string | ||
# VERSION can be overridden on make commandline: make VERSION=0.9.1 push | ||
ifndef VERSION | ||
VERSION := $(shell git describe --tags --always --dirty) | ||
endif | ||
override VERSION := $(VERSION)-$(MARIADB_VERSION) | ||
|
||
# | ||
# This version-strategy uses a manual value to set the version string | ||
#VERSION := 1.2.3 | ||
|
||
# Each section of the Makefile is included from standard components below. | ||
# If you need to override one, import its contents below and comment out the | ||
# include. That way the base components can easily be updated as our general needs | ||
# change. | ||
#include build-tools/makefile_components/base_build_go.mak | ||
include ../../../build-tools/makefile_components/base_build_python-docker.mak | ||
include ../../../build-tools/makefile_components/base_container.mak | ||
include ../../../build-tools/makefile_components/base_push.mak | ||
#include build-tools/makefile_components/base_test_go.mak | ||
#include ../../build-tools/makefile_components/base_test_python.mak | ||
|
||
build: container | ||
|
||
test: container | ||
cd .. && ./test/testserver.sh $(DOCKER_REPO):$(VERSION) $(MARIADB_VERSION) |
File renamed without changes.
103 changes: 103 additions & 0 deletions
103
containers/ddev-dbserver/10.1/files/docker-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 |
---|---|---|
@@ -0,0 +1,103 @@ | ||
#!/bin/bash | ||
set -x | ||
set -eu | ||
set -o pipefail | ||
|
||
SOCKET=/var/tmp/mysql.sock | ||
|
||
# Wait for mysql server to be ready. | ||
function serverwait { | ||
for i in {60..0}; | ||
do | ||
if mysqladmin ping -uroot --socket=$SOCKET >/dev/null 2>&1; then | ||
return 0 | ||
fi | ||
# Test to make sure we got it started in the first place. kill -s 0 just tests to see if process exists. | ||
if ! kill -s 0 $pid 2>/dev/null; then | ||
echo "MariaDB initialization startup failed" | ||
return 2 | ||
fi | ||
echo "MariaDB initialization startup process in progress... Try# $i" | ||
sleep 1 | ||
done | ||
return 1 | ||
} | ||
|
||
# If we have a restore_snapshot arg, get the snapshot directory | ||
# otherwise, fail and abort startup | ||
if [ $# = "2" -a "${1:-}" = "restore_snapshot" ] ; then | ||
snapshot_dir="/mnt/ddev_config/db_snapshots/${2:-nothingthere}" | ||
if [ -d "$snapshot_dir" ] ; then | ||
echo "Restoring from snapshot directory $snapshot_dir" | ||
sudo rm -rf /var/lib/mysql/* | ||
else | ||
echo "$snapshot_dir does not exist, not attempting restore of snapshot" | ||
unset snapshot_dir | ||
exit 101 | ||
fi | ||
fi | ||
|
||
|
||
if [ -d /var/lib/mysql/mysql ]; then | ||
database_mariadb_version=10.1 | ||
if [ -f /var/lib/mysql/db_mariadb_version.txt ]; then | ||
database_mariadb_version=$(cat /var/lib/mysql/db_mariadb_version.txt) | ||
fi | ||
|
||
if [ "$MARIADB_VERSION" == "10.1" ] && [ "$database_mariadb_version" != "10.1" ]; then | ||
echo "Can't start MariaDB 10.1 server with a database from $database_mariadb_version." | ||
echo "Please export your database, remove it completely, and retry if you need to start it with MariaDB $MARIADB_VERSION." | ||
exit 102 | ||
fi | ||
fi | ||
|
||
sudo chown -R "$UID:$(id -g)" /var/lib/mysql | ||
|
||
# If we have extra mariadb cnf files,, copy them to where they go. | ||
if [ -d /mnt/ddev_config/mysql -a "$(echo /mnt/ddev_config/mysql/*.cnf)" != "/mnt/ddev_config/mysql/*.cnf" ] ; then | ||
cp /mnt/ddev_config/mysql/*.cnf /etc/mysql/conf.d | ||
chmod ugo-w /etc/mysql/conf.d/* | ||
fi | ||
|
||
# If mariadb has not been initialized, copy in the base image from either the default starter image (/var/tmp/mysqlbase) | ||
# or from a provided $snapshot_dir. | ||
if [ ! -d "/var/lib/mysql/mysql" ]; then | ||
target=${snapshot_dir:-/var/tmp/mysqlbase/} | ||
name=$(basename $target) | ||
sudo rm -rf /var/lib/mysql/* /var/lib/mysql/.[a-z]* && sudo chmod -R ugo+w /var/lib/mysql | ||
sudo chmod -R ugo+r $target | ||
mariabackup --prepare --target-dir "$target" --user root --password root --socket=$SOCKET 2>&1 | tee "/var/log/mariabackup_prepare_$name.log" | ||
mariabackup --copy-back --force-non-empty-directories --target-dir "$target" --user root --password root --socket=$SOCKET 2>&1 | tee "/var/log/mariabackup_copy_back_$name.log" | ||
echo 'Database initialized from $target' | ||
fi | ||
|
||
if [ -f /var/lib/mysql/db_mariadb_version.txt ]; then | ||
db_mariadb_version=$(cat /var/lib/mysql/db_mariadb_version.txt) | ||
else | ||
echo "No existing db_mariadb_version.txt was found, so assuming it was mariadb 10.1" | ||
db_mariadb_version="10.1" # Assume it was 10.1; we didn't maintain this before 10.2 | ||
fi | ||
|
||
my_mariadb_version=$(mysql -V | awk '{sub( /\.[0-9]+-MariaDB,/, ""); print $5 }') | ||
if [ "$my_mariadb_version" != "$db_mariadb_version" ]; then | ||
mysqld --skip-networking --skip-grant-tables --socket=$SOCKET >/tmp/mysqld_temp_startup.log 2>&1 & | ||
pid=$! | ||
if ! serverwait ; then | ||
echo "Failed to get mysqld running to run mysql_upgrade" | ||
exit 103 | ||
fi | ||
echo "Running mysql_upgrade because my_mariadb_version=$my_mariadb_version is not the same as db_mariadb_version=$db_mariadb_version" | ||
mysql_upgrade --socket=$SOCKET | ||
kill $pid | ||
fi | ||
|
||
# And use the mariadb version we have here. | ||
echo $my_mariadb_version >/var/lib/mysql/db_mariadb_version.txt | ||
|
||
echo | ||
echo 'MySQL init process done. Ready for start up.' | ||
echo | ||
|
||
echo "Starting mysqld." | ||
tail -f /var/log/mysqld.log & | ||
exec mysqld |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added
BIN
+16 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/aria_log.00000001
Binary file not shown.
Binary file added
BIN
+52 Bytes
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/aria_log_control
Binary file not shown.
16 changes: 16 additions & 0 deletions
16
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/backup-my.cnf
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,16 @@ | ||
# This MySQL options file was generated by innobackupex. | ||
|
||
# The MySQL server | ||
[mysqld] | ||
innodb_checksum_algorithm=INNODB | ||
innodb_log_checksum_algorithm=INNODB | ||
innodb_data_file_path=ibdata1:12M:autoextend | ||
innodb_log_files_in_group=2 | ||
innodb_log_file_size=67108864 | ||
innodb_page_size=16384 | ||
innodb_log_block_size=512 | ||
innodb_undo_directory=. | ||
innodb_undo_tablespaces=0 | ||
|
||
|
||
|
File renamed without changes.
1 change: 1 addition & 0 deletions
1
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/db_mariadb_version.txt
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 @@ | ||
10.1 |
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+4 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/column_stats.MYI
Binary file not shown.
Binary file added
BIN
+2.54 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/column_stats.frm
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+4 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/columns_priv.MYI
Binary file not shown.
Binary file added
BIN
+2.06 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/columns_priv.frm
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added
BIN
+804 Bytes
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/general_log.frm
Binary file not shown.
Binary file added
BIN
+1 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/gtid_slave_pos.frm
Binary file not shown.
Binary file added
BIN
+96 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/gtid_slave_pos.ibd
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+3 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/help_category.MYI
Binary file not shown.
Binary file added
BIN
+1.67 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/help_category.frm
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+16 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/help_keyword.MYI
Binary file not shown.
Binary file added
BIN
+1.6 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/help_keyword.frm
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+19 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/help_relation.MYI
Binary file not shown.
Binary file added
BIN
+970 Bytes
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/help_relation.frm
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+20 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/help_topic.MYI
Binary file not shown.
Binary file added
BIN
+1.73 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/help_topic.frm
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+4 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/index_stats.MYI
Binary file not shown.
Binary file added
BIN
+1.59 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/index_stats.frm
Binary file not shown.
Binary file added
BIN
+4.88 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/innodb_index_stats.frm
Binary file not shown.
Binary file added
BIN
+96 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/innodb_index_stats.ibd
Binary file not shown.
Binary file added
BIN
+1.47 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/innodb_table_stats.frm
Binary file not shown.
Binary file added
BIN
+96 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/innodb_table_stats.ibd
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file added
BIN
+1.48 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/plugin.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+4 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/procs_priv.MYI
Binary file not shown.
Binary file added
BIN
+2.81 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/procs_priv.frm
Binary file not shown.
1 change: 1 addition & 0 deletions
1
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/proxies_priv.MYD
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 @@ | ||
�localhost root \W��8a4e3d46e4b2 root \W� |
Binary file added
BIN
+10 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/proxies_priv.MYI
Binary file not shown.
Binary file added
BIN
+2.77 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/proxies_priv.frm
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+4 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/roles_mapping.MYI
Binary file not shown.
Binary file added
BIN
+1.62 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/roles_mapping.frm
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file added
BIN
+2.64 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/servers.frm
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added
BIN
+2.32 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/slow_log.frm
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+2 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/table_stats.MYI
Binary file not shown.
Binary file added
BIN
+1.34 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/table_stats.frm
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+4 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/tables_priv.MYI
Binary file not shown.
Binary file added
BIN
+2.89 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/tables_priv.frm
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+14 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone.MYI
Binary file not shown.
Binary file added
BIN
+973 Bytes
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone.frm
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+1 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone_leap_second.MYI
Binary file not shown.
Binary file added
BIN
+971 Bytes
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone_leap_second.frm
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+30 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone_name.MYI
Binary file not shown.
Binary file added
BIN
+1.12 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone_name.frm
Binary file not shown.
Binary file added
BIN
+1.3 MB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone_transition.MYD
Binary file not shown.
Binary file added
BIN
+1.44 MB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone_transition.MYI
Binary file not shown.
Binary file added
BIN
+1013 Bytes
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone_transition.frm
Binary file not shown.
Binary file added
BIN
+231 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone_transition_type.MYD
Binary file not shown.
Binary file added
BIN
+90 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone_transition_type.MYI
Binary file not shown.
Binary file added
BIN
+1.05 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/time_zone_transition_type.frm
Binary file not shown.
Binary file added
BIN
+708 Bytes
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/mysql/user.MYD
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/xtrabackup_binlog_info
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 @@ | ||
on.000004 4206934 0-1-4734 |
5 changes: 5 additions & 0 deletions
5
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/xtrabackup_checkpoints
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,5 @@ | ||
backup_type = full-backuped | ||
from_lsn = 0 | ||
to_lsn = 1616727 | ||
last_lsn = 1616727 | ||
recover_binlog_info = 0 |
17 changes: 17 additions & 0 deletions
17
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/xtrabackup_info
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,17 @@ | ||
uuid = 568216a0-f717-11e8-b03c-0242ac110002 | ||
name = | ||
tool_name = mariabackup | ||
tool_command = --backup --target-dir=/mysqlbase --user root --password=... root --socket=/var/tmp/mysql.sock | ||
tool_version = 10.1.32-MariaDB | ||
ibbackup_version = 10.1.32-MariaDB | ||
server_version = 10.1.32-MariaDB | ||
start_time = 2018-12-03 16:20:21 | ||
end_time = 2018-12-03 16:20:24 | ||
lock_time = 0 | ||
binlog_pos = filename 'on.000004', position '4206934', GTID of the last change '0-1-4734' | ||
innodb_from_lsn = 0 | ||
innodb_to_lsn = 1616727 | ||
partial = N | ||
incremental = N | ||
format = file | ||
compressed = N |
Binary file added
BIN
+2.5 KB
containers/ddev-dbserver/10.1/files/var/tmp/mysqlbase/xtrabackup_logfile
Binary file not shown.
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
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,53 @@ | ||
# Makefile for a standard repo with associated container | ||
|
||
##### These variables need to be adjusted in most repositories ##### | ||
|
||
# This repo's root import path (under GOPATH). | ||
# PKG := github.com/drud/repo_name | ||
|
||
# Docker repo for a push | ||
DOCKER_REPO ?= drud/ddev-dbserver | ||
|
||
MARIADB_VERSION=10.2 | ||
|
||
# Upstream repo used in the Dockerfile | ||
# UPSTREAM_REPO ?= oraclelinux:7.3 | ||
|
||
# Top-level directories to build | ||
#SRC_DIRS := files drudapi secrets utils | ||
|
||
# Optional to docker build | ||
# DOCKER_ARGS = --build-arg MYSQL_PACKAGE_VERSION=5.7.17-1 | ||
|
||
|
||
# VERSION can be set by | ||
# Default: git tag | ||
# make command line: make VERSION=0.9.0 | ||
# It can also be explicitly set in the Makefile as commented out below. | ||
|
||
# This version-strategy uses git tags to set the version string | ||
# VERSION can be overridden on make commandline: make VERSION=0.9.1 push | ||
ifndef VERSION | ||
VERSION := $(shell git describe --tags --always --dirty) | ||
endif | ||
override VERSION := $(VERSION)-$(MARIADB_VERSION) | ||
|
||
# | ||
# This version-strategy uses a manual value to set the version string | ||
#VERSION := 1.2.3 | ||
|
||
# Each section of the Makefile is included from standard components below. | ||
# If you need to override one, import its contents below and comment out the | ||
# include. That way the base components can easily be updated as our general needs | ||
# change. | ||
#include build-tools/makefile_components/base_build_go.mak | ||
include ../../../build-tools/makefile_components/base_build_python-docker.mak | ||
include ../../../build-tools/makefile_components/base_container.mak | ||
include ../../../build-tools/makefile_components/base_push.mak | ||
#include build-tools/makefile_components/base_test_go.mak | ||
#include ../../build-tools/makefile_components/base_test_python.mak | ||
|
||
build: container | ||
|
||
test: container | ||
cd .. && ./test/testserver.sh $(DOCKER_REPO):$(VERSION) $(MARIADB_VERSION) |
Oops, something went wrong.