From 10494a03a9e626daf5aa420828909a6e7d433669 Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Thu, 26 May 2016 12:08:24 +0200 Subject: [PATCH 1/2] first version for docker-compose --- docker-compose.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c0ddafe --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: '2' +services: + rollerverbrauch: + build: . + depends_on: + - database + volumes: + - /home/jlusiardi/Documents/rollerverbrauch_config/:/config + environment: + - config=/config/config.py + - DATABASE_ENV_MYSQL_ROOT_PASSWORD=foobar123 + ports: + - 5000 + database: + image: mysql + environment: + - MYSQL_ROOT_PASSWORD=foobar123 + - MYSQL_DATABASE=pitstops + ports: + - 3306 \ No newline at end of file From 63ff5845e2c7f0956446ac530932ee41f872a68d Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Thu, 26 May 2016 13:54:51 +0200 Subject: [PATCH 2/2] added demo config --- compose_config/config.py | 16 ++++++++++++++++ docker-compose.yml | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 compose_config/config.py diff --git a/compose_config/config.py b/compose_config/config.py new file mode 100644 index 0000000..e40e62a --- /dev/null +++ b/compose_config/config.py @@ -0,0 +1,16 @@ +import os + +SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:%s@database/pitstops' % (os.environ['DATABASE_ENV_MYSQL_ROOT_PASSWORD']) +#SQLALCHEMY_DATABASE_URI = 'sqlite:////data/rollerverbrauch.db' + +MAIL_SERVER = '' +MAIL_PORT= 25 +MAIL_USE_TLS = True +MAIL_USE_SSL = False +MAIL_USERNAME = '' +MAIL_PASSWORD = '' +SECURITY_EMAIL_SENDER = '' +SECURITY_PASSWORD_SALT = 'SecretSalt' +SECRET_KEY = 'SecretKey' + +SECURITY_SEND_REGISTER_EMAIL = False diff --git a/docker-compose.yml b/docker-compose.yml index c0ddafe..244f5ea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: depends_on: - database volumes: - - /home/jlusiardi/Documents/rollerverbrauch_config/:/config + - ./compose_config/:/config environment: - config=/config/config.py - DATABASE_ENV_MYSQL_ROOT_PASSWORD=foobar123