From 4f4fafed3f5accd67c191203b09e949e582a65ef Mon Sep 17 00:00:00 2001 From: Oliver Marks Date: Wed, 25 May 2016 21:13:43 +0100 Subject: [PATCH] commiting docker compose files --- Dockerfile | 5 +++-- docker-compose.yml | 25 +++++++++++++++++++++++++ site/config/settings.py | 4 ++-- site/templates/emails/confirm_email.md | 3 +++ 4 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 docker-compose.yml create mode 100644 site/templates/emails/confirm_email.md diff --git a/Dockerfile b/Dockerfile index c45c8d2..9a44ad9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # # VERSION 0.0.1 -FROM ubuntu:14.04 +FROM ubuntu:16.04 MAINTAINER Oliver Marks "olymk2@gmail.com" # make sure the package repository is up to date @@ -11,7 +11,7 @@ RUN \ apt-get upgrade -y && \ apt-get install -y libssl-dev libffi-dev && \ apt-get install -y software-properties-common python-software-properties && \ - apt-get install -y python-MySQLdb python-psycopg2 python-requests-oauthlib python-pip python-dev python-dateutil python-requests python-lxml python-flask python-flask-login && \ + apt-get install -y python-mysqldb python-psycopg2 python-requests-oauthlib python-pip python-dev python-dateutil python-requests python-lxml python-flask python-flask-login python-pillow && \ apt-get install -y cssmin slimit && \ add-apt-repository -y ppa:oly/ppa && \ apt-get update && \ @@ -28,3 +28,4 @@ ENTRYPOINT /bin/sh -c 'cd /var/www/site; python index.py' #docker build -t mhackspace . #docker run -d --name=mhackspace_container --restart=always mhackspace #accesss on dockerip 172.17.0.?:5000 +#https://hub.docker.com/r/olymk2/mhackspace/ diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ba64b65 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,25 @@ + +nginx: + image: olymk2/mhackspace + #name: mhackspace + links: + - db:database + dns: + - 8.8.8.8 + - 8.8.4.4 + ports: + - "5000:5000" + volumes: + - .:/var/www + restart: always + +db: + image: mariadb + ports: + - "3300:3306" + environment: + MYSQL_DATABASE: maidstone_hackspace + MYSQL_USER: mhackspace + MYSQL_PASSWORD: mhackspace + MYSQL_ROOT_PASSWORD: mhackspace + restart: always diff --git a/site/config/settings.py b/site/config/settings.py index 4716f64..5912fe0 100644 --- a/site/config/settings.py +++ b/site/config/settings.py @@ -18,8 +18,8 @@ database = { 'charset': 'utf8', 'use_unicode': True, 'type': 'mysql', - 'host': '127.0.0.1', - 'user': 'root', + 'host': 'database', + 'user': 'mhackspace', 'passwd': "mhackspace", 'db': "maidstone_hackspace", 'port': 3306} diff --git a/site/templates/emails/confirm_email.md b/site/templates/emails/confirm_email.md new file mode 100644 index 0000000..e4b38ac --- /dev/null +++ b/site/templates/emails/confirm_email.md @@ -0,0 +1,3 @@ +Please follow the link below to confirm your email address. + +