Moved Dockerfile and docker-compose.yml to top directory.

This commit is contained in:
2019-09-25 18:45:50 +05:00
parent e26a466efc
commit 7f2174a33e
4 changed files with 22 additions and 18 deletions

View File

@@ -1,15 +0,0 @@
FROM golang:1.11-alpine AS build
WORKDIR /app
RUN apk add git && \
go get -u -v gitlab.com/pztrn/fastpastebin/cmd/fastpastebin
FROM alpine:3.10
LABEL maintainer "Stanislav N. <pztrn@pztrn.name>"
COPY --from=build /go/bin/fastpastebin /app/fastpastebin
COPY fastpastebin.docker.yaml /app/fastpastebin.yaml
EXPOSE 25544
ENTRYPOINT [ "/app/fastpastebin", "-config", "/app/fastpastebin.yaml" ]

View File

@@ -1,37 +0,0 @@
version: "3"
volumes:
mysql:
services:
database:
image: mariadb:10.3
container_name: database
restart: always
volumes:
- mysql:/var/lib/mysql
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_DATABASE=fastpastebin
- MYSQL_USER=fastpastebin
- MYSQL_PASSWORD=fastpastebin
fastpastebin:
build: .
image: fastpastebin
container_name: fastpastebin
restart: always
depends_on:
- database
volumes:
- ./fastpastebin.docker.yaml:/app/fastpastebin.yaml:ro
# ports:
# - 25544:25544
web:
image: nginx:1.16-alpine
container_name: nginx
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- 8080:80
depends_on:
- fastpastebin