Docker things

This commit is contained in:
Adamas 2023-10-22 22:23:42 +02:00
parent 1764a3439b
commit a689047c23
2 changed files with 28 additions and 0 deletions

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:18-slim
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm install --silent
RUN npm install react-scripts@5.0.1 -g --silent
# add app
COPY . ./
# start app
CMD ["npm", "start"]

15
docker-compose.yml Normal file
View File

@ -0,0 +1,15 @@
version: '2'
services:
server:
image: adm/portfolio:latest
networks:
- traefik_default
labels:
- "traefik.enable=true"
- "traefik.http.routers.portfolio.rule=Host(`anthony-dumas.fr`)"
- "traefik.http.routers.portfolio.entrypoints=websecure"
- "traefik.http.routers.portfolio.tls.certresolver=myresolver"
- "traefik.http.services.portfolio.loadbalancer.server.port=3000"
networks:
traefik_default:
external: true