chore(workflow, docker): ignore .yml files in build workflow, update Dockerfile for multi-platform support, and add docker-compose.yml

Add docker-compose.yml for local development and testing.
This commit is contained in:
wood chen 2024-10-29 23:09:03 +08:00
parent 0719bce7aa
commit c82e9a1d3a
3 changed files with 14 additions and 3 deletions

View File

@ -3,7 +3,7 @@ name: Build and Push Docker Image
on:
push:
branches: [ main ]
paths-ignore: [ '**.md' ]
paths-ignore: [ '**.md','docker-compose.yml' ]
pull_request:
branches: [ main ]

View File

@ -1,7 +1,9 @@
FROM alpine:latest
FROM --platform=$TARGETPLATFORM alpine:latest
WORKDIR /app
COPY proxy-go /app/
COPY proxy-go.$TARGETARCH /app/proxy-go
RUN mkdir -p /app/data && \
chmod +x /app/proxy-go && \
apk add --no-cache ca-certificates tzdata && \

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
services:
proxy:
image: woodchen/proxy-go:latest
container_name: proxy-go
ports:
- "3334:80"
volumes:
- ./data:/app/data
restart: always