Merge pull request #147 from xSke/leagues
Update Dockerfile for frontend build
This commit is contained in:
commit
c141c0a02f
6
.dockerignore
Normal file
6
.dockerignore
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
venv/
|
||||||
|
matteo_env/
|
||||||
|
__pycache__/
|
||||||
|
simmadome/node_modules
|
||||||
|
data/
|
||||||
|
.git/
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -344,6 +344,7 @@ config.json
|
||||||
games_config.json
|
games_config.json
|
||||||
weather_config.json
|
weather_config.json
|
||||||
ids
|
ids
|
||||||
|
data/
|
||||||
|
|
||||||
# database
|
# database
|
||||||
matteo.db
|
matteo.db
|
||||||
|
@ -351,5 +352,6 @@ matteo.db-wal
|
||||||
matteo.db-shm
|
matteo.db-shm
|
||||||
/data/leagues/*
|
/data/leagues/*
|
||||||
/matteo_env/Lib/site-packages/flask_socketio/__init__.py
|
/matteo_env/Lib/site-packages/flask_socketio/__init__.py
|
||||||
|
Pipfile
|
||||||
|
|
||||||
env
|
env
|
||||||
|
|
19
Dockerfile
19
Dockerfile
|
@ -1,9 +1,20 @@
|
||||||
FROM python:3.8
|
# - Build stage 1: frontend (simmadome/ directory)
|
||||||
EXPOSE 5000
|
FROM node:alpine AS frontend
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . ./
|
COPY simmadome/package.json simmadome/package-lock.json ./
|
||||||
|
RUN npm install
|
||||||
|
COPY simmadome/ ./
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# - Build stage 2: backend (Python)
|
||||||
|
FROM python:3.8
|
||||||
|
EXPOSE 5000
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY requirements.txt .
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
|
COPY . ./
|
||||||
|
COPY --from=frontend /app/build/ simmadome/build/
|
||||||
|
|
||||||
CMD ["python", "the_prestige.py"]
|
CMD ["python", "the_prestige.py"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user