Create Dockerfile and add example docker-compose.yml

This commit is contained in:
Matthias Loibl 2016-12-25 16:33:57 +01:00
parent c7c30e25f2
commit c6f9516ca6
No known key found for this signature in database
GPG Key ID: B1C7DF661ABB2C1A
2 changed files with 37 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -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

23
docker-compose.yml Normal file
View File

@ -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"