mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-08 05:29:51 +00:00
Add docker support
This commit is contained in:
parent
ec25d092d7
commit
852d4fb358
35
.github/workflows/push_image.yml
vendored
35
.github/workflows/push_image.yml
vendored
@ -1,35 +0,0 @@
|
|||||||
name: Docker Image CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["main"]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-push:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
|
|
||||||
with:
|
|
||||||
registry: registry.cn-shanghai.aliyuncs.com
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
push: true
|
|
||||||
tags: registry.cn-shanghai.aliyuncs.com/usual2970/certimate:latest
|
|
@ -1,5 +1,7 @@
|
|||||||
FROM golang:1.22-alpine
|
FROM golang:1.22-alpine
|
||||||
|
|
||||||
|
ENV GOPROXY=https://goproxy.cn
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ../. /app/
|
COPY ../. /app/
|
||||||
|
@ -2,7 +2,7 @@ version: '3.0'
|
|||||||
services:
|
services:
|
||||||
certimate:
|
certimate:
|
||||||
image: registry.cn-shanghai.aliyuncs.com/usual2970/certimate:latest
|
image: registry.cn-shanghai.aliyuncs.com/usual2970/certimate:latest
|
||||||
container_name: certimate
|
container_name: certimate_server
|
||||||
ports:
|
ports:
|
||||||
- 8090:8090
|
- 8090:8090
|
||||||
volumes:
|
volumes:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user