From 05161108d9f53fb28c433a6453cb46aebcc65840 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Sat, 14 Jan 2017 19:15:20 -0500 Subject: [PATCH] Docker! --- .dockerignore | 10 ++++++++++ .gitignore | 1 + Dockerfile | 31 +++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..faf23bd --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +.dart_tool +.idea +.pub +.vscode +logs/ +test/ +build/ +.analysis-options +.packages +*.g.dart \ No newline at end of file diff --git a/.gitignore b/.gitignore index 101449f..2e6f7e0 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,4 @@ fabric.properties !.vscode/extensions.json logs/ +*.pem diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e19083f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM ubuntu:14.04 +MAINTAINER Tobe O + +# Install Dart SDK 1.21 +RUN sudo apt-get update +RUN sudo apt-get install apt-transport-https +RUN sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -' +RUN sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list' +RUN sudo apt-get update +RUN sudo apt-get install dart=1.21.* +RUN export PATH="/usr/lib/dart/bin:$PATH" + +# Copy necessary files +ADD bin/ bin/ +ADD config/ config/ +ADD lib/ lib/ +ADD tool/ tool/ +ADD views/ view/ +ADD web/ web/ +ADD pubspec.lock pubspec.lock +ADD pubspec.yaml pubspec.yaml + +# Install dependencies, pre-build +RUN pub get +RUN dart tool/build.dart +RUN pub build + +# Set environment, start multi-server :) +ENV ANGEL_ENV=production +EXPOSE 80 +RUN dart bin/multi_server.dart \ No newline at end of file