forked from SelfhostedPro/Yacht
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created backup of dockerfile in /backup-files/dockerfile
- Loading branch information
1 parent
fb7a1ab
commit 80013d4
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# 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 &&\ | ||
# Delay cleaning up until all tasks are done | ||
RUN 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 |