Simplify, have just 1 Dockerfile
This commit is contained in:
parent
36a961181a
commit
34efc06607
12
.drone.yml
12
.drone.yml
|
@ -2,18 +2,6 @@ kind: pipeline
|
|||
name: default
|
||||
|
||||
steps:
|
||||
- name: build_stable
|
||||
image: node:20-alpine
|
||||
commands:
|
||||
- git clone https://github.com/cheeaun/phanpy.git
|
||||
- cd phanpy
|
||||
- git checkout 2023.12.13.19da64a
|
||||
- npm install
|
||||
- npm run build
|
||||
- cp dist ../output
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
|
||||
# stable site
|
||||
- name: docker_stable
|
||||
|
|
19
Dockerfile
19
Dockerfile
|
@ -1,3 +1,20 @@
|
|||
FROM node:20-alpine
|
||||
|
||||
RUN apk add git
|
||||
|
||||
RUN cd / && \
|
||||
git clone https://github.com/cheeaun/phanpy.git && \
|
||||
cd phanpy && \
|
||||
git checkout 2023.12.31.8aa0542
|
||||
|
||||
# builds to /phanpy/dist
|
||||
RUN cd /phanpy && \
|
||||
npm install && \
|
||||
npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=0 /phanpy/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
COPY output/ /usr/share/nginx/html
|
||||
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
FROM node:20-alpine
|
||||
|
||||
RUN apk add git
|
||||
|
||||
RUN cd / && \
|
||||
git clone https://github.com/cheeaun/phanpy.git && \
|
||||
cd phanpy && \
|
||||
git checkout 2023.12.31.8aa0542
|
||||
|
||||
# builds to /phanpy/dist
|
||||
RUN cd /phanpy && \
|
||||
npm install && \
|
||||
npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=0 /phanpy/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
|
Loading…
Reference in a new issue