Skip to content
Snippets Groups Projects
Commit 76780ea6 authored by Dariusz Janny's avatar Dariusz Janny
Browse files

Merge branch 'master' into 'master'

[faas#28] moving secrets to separate env file.

See merge request !4
parents 9d9db93b 48ccb6db
Branches master
No related tags found
1 merge request!4[edugain/faas#28] moving secrets to separate env file.
......@@ -3,6 +3,11 @@ config ?= conf/faas-db.cnf
include $(config)
export $(shell sed 's/=.*//' $(config))
credentials ?= conf/credentials/faas-db-default.cnf
include $(credentials)
export $(shell sed 's/=.*//' $(credentials))
export FAAS_DB_IMAGE=${FAAS_DB_REPO}/${FAAS_DB_NAME}:${FAAS_DB_VERSION}
.DEFAULT_GOAL := help
......@@ -16,10 +21,10 @@ build-nc: # build container without caching
docker build --no-cache -t ${FAAS_DB_IMAGE} --build-arg FAAS_DB_NAME=${FAAS_DB_NAME} --build-arg FAAS_DB_IMAGE=${FAAS_DB_IMAGE} --build-arg FAAS_DB_VERSION=${FAAS_DB_VERSION} .
run: # run container
docker run -i -t --detach --rm --env-file=$(config) -p=${FAAS_DB_PORT}:3306 --name="${FAAS_DB_NAME}" -v ${FAAS_DB_VOLUME_VAR_LIB_MYSQL}:/var/lib/mysql ${FAAS_DB_IMAGE}
docker run -i -t --detach --rm --env-file=$(config) --env-file=$(credentials) -p=${FAAS_DB_PORT}:3306 --name="${FAAS_DB_NAME}" -v ${FAAS_DB_VOLUME_VAR_LIB_MYSQL}:/var/lib/mysql ${FAAS_DB_IMAGE}
run-nd: # run container in no-deamon mode
docker run -i -t --rm --env-file=$(config) -p=${FAAS_DB_PORT}:3306 --name="${FAAS_DB_NAME}" -v ${FAAS_DB_VOLUME_VAR_LIB_MYSQL}:/var/lib/mysql ${FAAS_DB_IMAGE}
docker run -i -t --env-file=$(config) --env-file=$(credentials) --rm -p=${FAAS_DB_PORT}:3306 --name="${FAAS_DB_NAME}" -v ${FAAS_DB_VOLUME_VAR_LIB_MYSQL}:/var/lib/mysql ${FAAS_DB_IMAGE}
up: build run # build and run container
......
/faas-db-test.cnf
MYSQL_ROOT_PASSWORD=changeme
\ No newline at end of file
......@@ -2,10 +2,5 @@ FAAS_DB_REPO=faas
FAAS_DB_VERSION=1.0-SNAPSHOT
FAAS_DB_NAME=faas-db
FAAS_DB_IMAGE=${FAAS_DB_REPO}/${FAAS_DB_NAME}:${FAAS_DB_VERSION}
FAAS_DB_VOLUME_VAR_LIB_MYSQL=/tmp/faas-db
FAAS_DB_PORT=8306
# TODO - remove to external resource
MYSQL_ROOT_PASSWORD=secure
FAAS_DB_PORT=9306
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment