Skip to content

Commit d012a35

Browse files
2 parents 167229f + 0aa9c37 commit d012a35

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

.Dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
/.github
12
/.vscode
23
/target
34
/images
45
*.env
56
*.tar
67
.DS_Store
8+
docker-compose.yaml

.github/workflows/build.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build docker image
2+
on:
3+
push:
4+
workflow_dispatch:
5+
6+
env:
7+
REGISTRY: ghcr.io
8+
IMAGE_NAME: ${{ github.repository }}
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
21+
- name: Log in to the Container registry
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- uses: docker/metadata-action@v5
29+
id: metadata
30+
with:
31+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
32+
tags: |
33+
latest
34+
35+
- uses: docker/build-push-action@v6
36+
with:
37+
push: ${{ github.event_name != 'pull_request' }}
38+
context: .
39+
tags: ${{ steps.metadata.outputs.tags }}
40+
labels: ${{ steps.metadata.outputs.labels }}
41+
cache-from: type=gha
42+
cache-to: type=gha,mode=max

docker-compose.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
services:
2+
server:
3+
image: ghcr.io/its-mypic/its_mypic_image_server:latest
4+
restart: unless-stopped
5+
ports:
6+
- 5678:5678
7+
environment:
8+
SERVER_IP: 0.0.0.0
9+
SERVER_PORT: 5678
10+
IMAGE_SOURCE_PATH: /images
11+
volumes:
12+
- /path/to/images:/images:ro

0 commit comments

Comments
 (0)