Compare commits
37 Commits
dependabot
...
master
Author | SHA1 | Date | |
---|---|---|---|
836332cb75 | |||
dff19b33a0 | |||
f3aa5556ad | |||
b9719cbad0 | |||
3316304f3d | |||
2edc63c692 | |||
14beeea518 | |||
1f3f4c5c27 | |||
8251b20d08 | |||
4456c275cf | |||
cf66e90918 | |||
e3d9d28681 | |||
6a33698b0f | |||
6e9ca7331a | |||
f32be9efaa | |||
8c37f7b192 | |||
4bcc9c435b | |||
687afd20d3 | |||
7842eed5e7 | |||
01af118af1 | |||
dd06907fba | |||
7d33e4cc28 | |||
ccc49544b2 | |||
653f2d9c6d | |||
b762a59477 | |||
1af13b49eb | |||
afc7252292 | |||
2f77ba4249 | |||
ebaf81efbc | |||
44f820ff24 | |||
3f1ad29bb7 | |||
6731d71795 | |||
e27e029921 | |||
503ddfbcc4 | |||
|
c7bbd0119f | ||
|
c4e9cd0f1d | ||
|
2981665f1f |
15
.drone.yml
Normal file
15
.drone.yml
Normal file
@ -0,0 +1,15 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.ericxliu.me
|
||||
username: master
|
||||
password: 1f8af4f82c0bd4dc24c1a03eaea6da13f54fed1c
|
||||
repo: git.ericxliu.me/master/getting-started
|
||||
tags: latest
|
||||
platform: linux/amd64
|
||||
custom_dns: [ 8.8.8.8 ]
|
||||
mtu: 1450
|
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@ -1,12 +1,30 @@
|
||||
name: Build
|
||||
on: [push, pull_request]
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
IMAGE_NAME: ${{ github.repository_owner }}/${{ github.event.repository.name }}
|
||||
DOCKER_HOST: tcp://docker.local:2375
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build
|
||||
uses: docker/build-push-action@v1
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
push: false
|
||||
repository: ${{ github.repository }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log in to the Docker registry
|
||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ${{ secrets.DOCKER_REGISTRY }} -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
||||
|
||||
- name: Build the Docker image
|
||||
run: docker build -t ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest .
|
||||
|
||||
- name: Push the Docker image
|
||||
run: docker push ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
34
Dockerfile
34
Dockerfile
@ -1,11 +1,33 @@
|
||||
# Install the base requirements for the app.
|
||||
# This stage is to support development.
|
||||
FROM python:alpine AS base
|
||||
ARG BUILDPLATFORM="linux/amd64"
|
||||
ARG TARGETPLATFORM="linux/amd64"
|
||||
|
||||
FROM --platform=$BUILDPLATFORM python:alpine AS base
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
FROM node:18-alpine AS app-base
|
||||
RUN ping -c5 8.8.8.8
|
||||
RUN ping -c5 208.67.222.222
|
||||
RUN ifconfig
|
||||
RUN uname -a
|
||||
RUN cat /etc/resolv.conf
|
||||
RUN route
|
||||
RUN ip address
|
||||
RUN ip route
|
||||
RUN nslookup google.com
|
||||
# RUN apk update
|
||||
# RUN apk add --no-cache curl dig
|
||||
# RUN dig https://google.com
|
||||
# RUN curl -IL google.com
|
||||
# RUN curl ifconfig.me
|
||||
|
||||
|
||||
|
||||
|
||||
RUN pip3 install --default-timeout=100 -r requirements.txt
|
||||
|
||||
FROM --platform=$BUILDPLATFORM node:18-alpine AS app-base
|
||||
WORKDIR /app
|
||||
COPY app/package.json app/yarn.lock ./
|
||||
COPY app/spec ./spec
|
||||
@ -25,16 +47,16 @@ RUN apk add zip && \
|
||||
zip -r /app.zip /app
|
||||
|
||||
# Dev-ready container - actual files will be mounted in
|
||||
FROM base AS dev
|
||||
FROM --platform=$BUILDPLATFORM base AS dev
|
||||
CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"]
|
||||
|
||||
# Do the actual build of the mkdocs site
|
||||
FROM base AS build
|
||||
FROM --platform=$BUILDPLATFORM base AS build
|
||||
COPY . .
|
||||
RUN mkdocs build
|
||||
|
||||
# Extract the static content from the build
|
||||
# and use a nginx image to serve the content
|
||||
FROM nginx:alpine
|
||||
FROM --platform=$TARGETPLATFORM nginx:alpine
|
||||
COPY --from=app-zip-creator /app.zip /usr/share/nginx/html/assets/app.zip
|
||||
COPY --from=build /app/site /usr/share/nginx/html
|
||||
|
Loading…
Reference in New Issue
Block a user