mirror of
https://github.com/runyanjake/jakesphotos.git
synced 2025-10-05 07:57:29 -07:00
OOps here are the files
This commit is contained in:
parent
f7657648b6
commit
9c86bffcd2
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Use the official Node.js image as a build stage
|
||||||
|
FROM node:14 AS build
|
||||||
|
|
||||||
|
# Set the working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy package.json and package-lock.json
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the rest of the application code
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Build the React application
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Use a lightweight web server to serve the build files
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
# Copy the build files from the previous stage
|
||||||
|
COPY --from=build /app/build /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Expose port 80
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
# Start Nginx
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
20
docker-compose.yml
Normal file
20
docker-compose.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
version: '2.4'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
image: jakesphotos:latest
|
||||||
|
portfolio:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
networks:
|
||||||
|
- traefik
|
||||||
|
labels:
|
||||||
|
- traefik.http.routers.photography.rule=Host(`jakesphotos.whitney.rip`)
|
||||||
|
- traefik.http.routers.photography.tls=true
|
||||||
|
- traefik.http.routers.photography.tls.certresolver=lets-encrypt
|
||||||
|
- traefik.http.services.photography.loadbalancer.server.port=80
|
||||||
|
- traefik.port=80
|
Loading…
x
Reference in New Issue
Block a user