forked from SelfhostedPro/Yacht
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
63 lines (54 loc) · 1.21 KB
/
Dockerfile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Build Vue
FROM node:14.5.0-alpine as build-stage
ARG VUE_APP_VERSION
ENV VUE_APP_VERSION=${VUE_APP_VERSION}
WORKDIR /app
COPY ./frontend/package*.json ./
RUN npm install
COPY ./frontend/ .
RUN npm run build
# Setup Container and install Flask
FROM lsiobase/alpine:3.12 as deploy-stage
# MAINTANER Your Name "info@selfhosted.pro"
# Set Variables
ENV PYTHONIOENCODING=UTF-8
ENV THEME=Default
WORKDIR /api
COPY ./backend/requirements.txt .
# Install Dependancies
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
g++ \
make \
postgresql-dev \
python3-dev \
libffi-dev \
ruby-dev &&\
echo "**** install packages ****" && \
apk add --no-cache \
python3 \
py3-pip \
mysql-dev \
postgresql-dev \
mysql-dev \
nginx &&\
gem install sass &&\
echo "**** Installing Python Modules ****" && \
pip3 install wheel &&\
pip3 install -r requirements.txt &&\
echo "**** Cleaning Up ****" &&\
apk del --purge \
build-dependencies && \
rm -rf \
/root/.cache \
/tmp/*
COPY ./backend/api ./
COPY ./backend/alembic /alembic
COPY root ./backend/alembic.ini /
# Vue
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/
# Expose
VOLUME /config
EXPOSE 8000