Compare commits

..

No commits in common. "docker/image-size" and "main" have entirely different histories.

9 changed files with 31 additions and 76 deletions

View file

@ -1,5 +1,3 @@
# LaTeX-Brief-Webseite # LaTeX-Brief-Webseite
[![Build Status](https://ci.sp-codes.de/api/badges/cami/Brief-Generator/status.svg)](https://ci.sp-codes.de/cami/Brief-Generator)
This is a small website to easily set a letter in LaTeX This is a small website to easily set a letter in LaTeX

View file

@ -1 +0,0 @@
venv

View file

@ -1,19 +1,11 @@
FROM python:slim as base FROM python
FROM base as builder
RUN mkdir /install
WORKDIR /install
COPY requirements.txt /requirements.txt
RUN pip install --prefix=/install -r /requirements.txt
FROM base
COPY --from=builder /install /usr/local
COPY /src /app
WORKDIR /app WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY /src .
CMD [ "flask", "run" ] CMD [ "flask", "run" ]

View file

@ -1,19 +1,15 @@
FROM python:slim as base FROM python
WORKDIR /app
RUN apt-get -y update && apt-get -y upgrade RUN apt-get -y update && apt-get -y upgrade
FROM base as builder COPY requirements.txt .
RUN mkdir /install
WORKDIR /install
COPY requirements.txt /requirements.txt RUN apt-get -y install sqlite3
RUN pip install --prefix=/install -r /requirements.txt
FROM base RUN pip install -r requirements.txt
COPY --from=builder /install /usr/local COPY /src .
COPY /src /app CMD [ "python", "app.py" ]
WORKDIR /app
CMD [ "flask", "run" ]

View file

@ -1,21 +0,0 @@
version: '3.7'
services:
frontend-prod:
container_name: frontend-lettergen
build:
context: ./frontend
dockerfile: Dockerfile.prod
ports:
- 127.0.0.1:3000:80
backend-prod:
container_name: backend-lettergen
build:
context: ./backend
dockerfile: Dockerfile.prod
ports:
- 127.0.0.1:5000:5000
environment:
DEBUG: "no"
PORT: 5050
HOST: "0.0.0.0"

View file

@ -1,12 +1,8 @@
**/node_modules/ node_modules
npm-debug.log
build
.dockerignore
**/.git **/.git
**/README.md **/.DS_Store
**/LICENSE **/node_modules
**/.vscode .env
**/npm-debug.log
**/coverage
**/.env
**/.editorconfig
**/.aws
**/dist

View file

@ -1,4 +1,4 @@
FROM node:slim AS build FROM node:latest
# set working directory # set working directory
WORKDIR /app WORKDIR /app
@ -10,9 +10,7 @@ ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./ COPY package.json ./
COPY package-lock.json ./ COPY package-lock.json ./
RUN npm install && npm cache clean --force RUN npm install
EXPOSE 3000
# add app # add app
COPY . ./ COPY . ./

View file

@ -1,18 +1,13 @@
FROM node:slim as build FROM node:latest as build
WORKDIR /app WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./ COPY package.json ./
COPY package-lock.json ./ COPY package-lock.json ./
RUN npm ci --silent
RUN npm ci --production && npm cache clean --force
COPY . ./ COPY . ./
RUN npm run build RUN npm run build
FROM nginx:alpine FROM nginx:latest
RUN apk -U upgrade
COPY --from=build /app/build /usr/share/nginx/html COPY --from=build /app/build /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d COPY nginx/nginx.conf /etc/nginx/conf.d

View file

@ -4,4 +4,6 @@ podman stop frontend-dev
podman stop backend-dev podman stop backend-dev
podman rm frontend-dev podman rm frontend-dev
podman rm backend-dev podman rm backend-dev
podman rmi localhost/latex-brief-webseite_backend-dev
podman rmi localhost/latex-brief-webseite_frontend-dev
podman-compose up --build podman-compose up --build