-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.server
More file actions
26 lines (21 loc) · 887 Bytes
/
Dockerfile.server
File metadata and controls
26 lines (21 loc) · 887 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
# Stage 1: Base image with dependencies
FROM --platform=linux/amd64 ubuntu:latest
RUN apt-get update && \
apt-get install -y python3 python3-pip postgresql-client libpq-dev libcurl4-openssl-dev libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Stage 2: Install pipenv and dependencies
RUN pip3 install pipenv
WORKDIR /app
COPY Pipfile Pipfile.lock ./
RUN pipenv install --system --deploy
# install and issue SSL certificates using certbot (requires workign website)
# RUN pip3 install certbot
# RUN /usr/local/bin/certbot certonly --standalone -d studyoracle.com -n --agree-tos --email infor@studyoracle.com
# Stage 3: Final image for running the application
COPY bin bin
COPY server server
# push the credentials to the container (for SQS queue)
COPY credentials /root/.aws/credentials
ENTRYPOINT ["/app/bin/docker-entrypoint"]
CMD ["serve"]