Compare commits

...

2 Commits

Author SHA1 Message Date
Benjamin Bach 266c7b9fff
Some stuff that works 2023-12-14 12:29:14 +01:00
Benjamin Bach c12add7dfc
Some experiment to try things out 2023-12-14 12:18:11 +01:00
4 changed files with 85 additions and 0 deletions

46
.drone.yml Normal file
View File

@ -0,0 +1,46 @@
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
image: plugins/docker
settings:
repo: docker.data.coop/data-coop-phanpy
registry: docker.data.coop
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
tags:
- "${DRONE_BUILD_NUMBER}"
- "stable"
when:
branch:
- main
event:
exclude:
- pull_request
- name: notify
image: plugins/matrix
settings:
homeserver: https://data.coop
roomid: plKSghHbepWeUEtbHE:data.coop
username:
from_secret: matrix_username
password:
from_secret: matrix_password

3
Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM nginx:alpine
EXPOSE 80
COPY output/ /usr/share/nginx/html

20
Dockerfile_phanpy Normal file
View File

@ -0,0 +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.13.19da64a
# 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

View File

@ -0,0 +1,16 @@
# Phanpy Docker setup and Drone build
This is an experiment. To build and run locally:
```
docker build . -t phanpy:latest -f Dockerfile_phanpy
```
To run the container:
```
docker run -p 8000:80 -t phanpy:latest
```
Now access Phanpy on http://localhost:8000