feat: rename Docker files to production
This commit is contained in:
parent
327e034c6e
commit
bd48bc87b7
4 changed files with 9 additions and 7 deletions
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
handle_path /api/* {
|
handle_path /api/* {
|
||||||
reverse_proxy * portfolio-backend:3001
|
reverse_proxy * portfolio-backend:3001
|
||||||
|
reverse_proxy * backend:3001
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handle * {
|
handle * {
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
version: "3"
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
portfolio-frontend:
|
frontend:
|
||||||
container_name: portfolio-frontend
|
container_name: frontend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./frontend.Dockerfile
|
dockerfile: ./production.frontend.Dockerfile
|
||||||
args:
|
args:
|
||||||
CUSTOM_UID: 1000
|
CUSTOM_UID: 1000
|
||||||
CUSTOM_GID: 1000
|
CUSTOM_GID: 1000
|
||||||
|
@ -16,12 +16,12 @@ services:
|
||||||
TZ: Europe/Berlin
|
TZ: Europe/Berlin
|
||||||
ports:
|
ports:
|
||||||
- "8000:3000"
|
- "8000:3000"
|
||||||
portfolio-backend:
|
backend:
|
||||||
container_name: portfolio-backend
|
container_name: backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./backend.Dockerfile
|
dockerfile: ./production.backend.Dockerfile
|
||||||
args:
|
args:
|
||||||
CUSTOM_UID: 1000
|
CUSTOM_UID: 1000
|
||||||
CUSTOM_GID: 1000
|
CUSTOM_GID: 1000
|
|
@ -4,7 +4,6 @@ FROM debian:latest
|
||||||
|
|
||||||
# Install packages
|
# Install packages
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
#RUN apt update && apt install -y python3-pip python3-venv && rm -rf /var/lib/apt/lists/*
|
|
||||||
RUN apt update && apt install -y curl && \
|
RUN apt update && apt install -y curl && \
|
||||||
curl -fsSL https://deb.nodesource.com/setup_19.x | bash - && apt-get install -y nodejs && \
|
curl -fsSL https://deb.nodesource.com/setup_19.x | bash - && apt-get install -y nodejs && \
|
||||||
apt install -y debian-keyring debian-archive-keyring apt-transport-https && \
|
apt install -y debian-keyring debian-archive-keyring apt-transport-https && \
|
||||||
|
@ -27,6 +26,7 @@ WORKDIR /app
|
||||||
COPY --chown=${CUSTOM_USERNAME}:${CUSTOM_GROUPNAME} package.json package-lock.json .postcssrc postcss.config.js tailwind.config.js Caddyfile /app/
|
COPY --chown=${CUSTOM_USERNAME}:${CUSTOM_GROUPNAME} package.json package-lock.json .postcssrc postcss.config.js tailwind.config.js Caddyfile /app/
|
||||||
COPY --chown=${CUSTOM_USERNAME}:${CUSTOM_GROUPNAME} frontend /app/frontend/
|
COPY --chown=${CUSTOM_USERNAME}:${CUSTOM_GROUPNAME} frontend /app/frontend/
|
||||||
COPY --chown=${CUSTOM_USERNAME}:${CUSTOM_GROUPNAME} public /app/public/
|
COPY --chown=${CUSTOM_USERNAME}:${CUSTOM_GROUPNAME} public /app/public/
|
||||||
|
COPY --chown=${CUSTOM_USERNAME}:${CUSTOM_GROUPNAME} robots /app/robots/
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
USER ${CUSTOM_UID:-1000}:${CUSTOM_GID:-1000}
|
USER ${CUSTOM_UID:-1000}:${CUSTOM_GID:-1000}
|
Loading…
Add table
Reference in a new issue