forked from WiiLink24/NintendoChannelWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (22 loc) · 717 Bytes
/
Dockerfile
File metadata and controls
34 lines (22 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM golang:alpine AS builder
WORKDIR /app
RUN apk add -U --no-cache git
RUN git clone https://github.com/WiiLink24/NintendoChannel .
RUN go build -o app cli/main.go
FROM python:3.10-alpine
RUN adduser -D server
WORKDIR /home/server
# Copy requirements first as to not disturb cache for other changes.
COPY requirements.txt .
# Install dependencies
RUN apk add -U --no-cache libpq-dev build-base
RUN pip3 install -r requirements.txt && \
pip3 install gunicorn
USER server
# Finally, copy the entire source.
COPY . .
# Copy file generator
COPY --from=builder /app/app cli
ENV FLASK_APP app.py
EXPOSE 5000
ENTRYPOINT ["gunicorn", "-b", ":5000", "--access-logfile", "-", "--error-logfile", "-", "app:app"]