Compare commits
1 Commits
master
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
|
b57e2553c0 |
15
.drone.yml
15
.drone.yml
@ -1,15 +0,0 @@
|
||||
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,30 +1,12 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
name: Build
|
||||
on: [push, pull_request]
|
||||
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:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
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
|
||||
push: false
|
||||
|
34
Dockerfile
34
Dockerfile
@ -1,33 +1,11 @@
|
||||
# Install the base requirements for the app.
|
||||
# This stage is to support development.
|
||||
ARG BUILDPLATFORM="linux/amd64"
|
||||
ARG TARGETPLATFORM="linux/amd64"
|
||||
|
||||
FROM --platform=$BUILDPLATFORM python:alpine AS base
|
||||
FROM python:alpine AS base
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
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
|
||||
FROM node:18-alpine AS app-base
|
||||
WORKDIR /app
|
||||
COPY app/package.json app/yarn.lock ./
|
||||
COPY app/spec ./spec
|
||||
@ -47,16 +25,16 @@ RUN apk add zip && \
|
||||
zip -r /app.zip /app
|
||||
|
||||
# Dev-ready container - actual files will be mounted in
|
||||
FROM --platform=$BUILDPLATFORM base AS dev
|
||||
FROM base AS dev
|
||||
CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"]
|
||||
|
||||
# Do the actual build of the mkdocs site
|
||||
FROM --platform=$BUILDPLATFORM base AS build
|
||||
FROM base AS build
|
||||
COPY . .
|
||||
RUN mkdocs build
|
||||
|
||||
# Extract the static content from the build
|
||||
# and use a nginx image to serve the content
|
||||
FROM --platform=$TARGETPLATFORM nginx:alpine
|
||||
FROM 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
|
||||
|
@ -2162,9 +2162,9 @@ json-parse-even-better-errors@^2.3.0:
|
||||
integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==
|
||||
|
||||
json5@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
|
||||
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
|
||||
version "2.2.3"
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
|
||||
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
|
||||
|
||||
kleur@^3.0.3:
|
||||
version "3.0.3"
|
||||
|
Loading…
Reference in New Issue
Block a user