Moved Dockerfile and docker-compose.yml to top directory.
This commit is contained in:
parent
e26a466efc
commit
7f2174a33e
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
examples/fastpastebin.yaml
|
examples/fastpastebin.yaml
|
||||||
dist/
|
dist/
|
||||||
data/
|
data/
|
||||||
|
|
||||||
|
*DS_Store*
|
||||||
|
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
FROM golang:1.13-alpine AS build
|
||||||
|
|
||||||
|
WORKDIR /go/src/gitlab.com/pztrn/fastpastebin
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
WORKDIR /go/src/gitlab.com/pztrn/fastpastebin/cmd/fastpastebin
|
||||||
|
|
||||||
|
RUN go build
|
||||||
|
|
||||||
|
FROM alpine:3.10
|
||||||
|
LABEL maintainer "Stanislav N. <pztrn@pztrn.name>"
|
||||||
|
|
||||||
|
COPY --from=build /go/src/gitlab.com/pztrn/fastpastebin/cmd/fastpastebin/fastpastebin /app/fastpastebin
|
||||||
|
COPY docker/fastpastebin.docker.yaml /app/fastpastebin.yaml
|
||||||
|
|
||||||
|
EXPOSE 25544
|
||||||
|
ENTRYPOINT [ "/app/fastpastebin", "-config", "/app/fastpastebin.yaml" ]
|
@ -9,7 +9,7 @@ services:
|
|||||||
container_name: database
|
container_name: database
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- mysql:/var/lib/mysql
|
- fastpastebin_mysql:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_RANDOM_ROOT_PASSWORD=yes
|
- MYSQL_RANDOM_ROOT_PASSWORD=yes
|
||||||
- MYSQL_DATABASE=fastpastebin
|
- MYSQL_DATABASE=fastpastebin
|
||||||
@ -23,14 +23,14 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
volumes:
|
volumes:
|
||||||
- ./fastpastebin.docker.yaml:/app/fastpastebin.yaml:ro
|
- ./docker/fastpastebin.docker.yaml:/app/fastpastebin.yaml:ro
|
||||||
# ports:
|
# ports:
|
||||||
# - 25544:25544
|
# - 25544:25544
|
||||||
web:
|
web:
|
||||||
image: nginx:1.16-alpine
|
image: nginx:1.16-alpine
|
||||||
container_name: nginx
|
container_name: nginx
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- 8080:80
|
||||||
depends_on:
|
depends_on:
|
@ -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" ]
|
|
Loading…
Reference in New Issue
Block a user