From c6f9516ca6239af5fc1fed9ab0f3cbf90349d4e7 Mon Sep 17 00:00:00 2001 From: Matthias Loibl Date: Sun, 25 Dec 2016 16:33:57 +0100 Subject: [PATCH] Create Dockerfile and add example docker-compose.yml --- Dockerfile | 14 ++++++++++++++ docker-compose.yml | 23 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5ad9ec8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM alpine:latest + +EXPOSE 8080 + +WORKDIR /app +VOLUME ["/app/storage"] +CMD ["/app/ana"] + +RUN apk add --update bash ca-certificates && rm -rf /var/cache/apk/* + +RUN mkdir -p /app/storage/sessions && chmod 777 /app/storage +ADD ./static /app/static +ADD ./views /app/views +ADD ./ana /app/ana diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d83d4b7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +ana: + image: metalmatze/ana + links: + - mysql + ports: + - "8080:8080" + environment: + - "ANA_DATABASE_NAME=ana" + - "ANA_DATABASE_USER=ana" + - "ANA_DATABASE_PASSWORD=password01" + - "ANA_DATABASE_HOST=tcp(mysql:3306)" + - "ANA_SECRET_KEY=TWEn6GXQDx45PZfmJWvyGpXf5M8b94bszgw8JcJWEd6WxgrnUkLatS34GwjPTvZb" + +mysql: + image: "mysql:5" + ports: + - "3306:3306" + environment: + - "MYSQL_ALLOW_EMPTY_PASSWORD=false" + - "MYSQL_DATABASE=ana" + - "MYSQL_PASSWORD=password01" + - "MYSQL_ROOT_PASSWORD=password01" + - "MYSQL_USER=ana"