diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 5805431..0000000 --- a/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM node:20-slim as build - -WORKDIR /opt - -COPY ./package.json /opt/package.json -COPY ./package-lock.json /opt/package-lock.json - -RUN npm ci - -COPY . . - -RUN npm run build - -FROM nginx:1.24-alpine-slim - -COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf -COPY --from=build /opt/dist /usr/share/nginx/html diff --git a/config/Dockerfile b/config/Dockerfile new file mode 100644 index 0000000..0573f78 --- /dev/null +++ b/config/Dockerfile @@ -0,0 +1,14 @@ +FROM node:24-slim as build + +WORKDIR /opt + +COPY package*.json ./ +RUN npm ci + +COPY . . +RUN npm run build + +FROM nginx:1.24-alpine-slim + +COPY config/nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=build /opt/dist /usr/share/nginx/html \ No newline at end of file diff --git a/docker-compose.yml b/config/docker-compose.yml similarity index 56% rename from docker-compose.yml rename to config/docker-compose.yml index 0cbda48..b8c91ba 100644 --- a/docker-compose.yml +++ b/config/docker-compose.yml @@ -6,7 +6,9 @@ services: container_name: zeldon-site build: context: . - dockerfile: Dockerfile + dockerfile: config/Dockerfile ports: - - 3123:80 + - "3123:80" restart: unless-stopped + volumes: + - ./config/nginx.conf:/etc/nginx/conf.d/default.conf:ro diff --git a/nginx/nginx.conf b/config/nginx.conf similarity index 100% rename from nginx/nginx.conf rename to config/nginx.conf diff --git a/index.html b/index.html index 678022e..fa9b331 100644 --- a/index.html +++ b/index.html @@ -1,81 +1,102 @@ - + +
+ + - - - + + + + - - - - + + + - - - +