Compare commits

..

No commits in common. "368789bf786eec6ee720289980776ad70e7b447d" and "84622efe828febc7d4e3332b4ef61e981cb2e9cb" have entirely different histories.

3 changed files with 16 additions and 50 deletions

View File

@ -1,28 +0,0 @@
name: Build docker image
on:
push:
branches: ["main"]
env:
REGISTRY: git.matterlinux.xyz
IMAGE: ${{gitea.repository}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: "https://github.com/actions/checkout@v4"
- name: Login to container repo
uses: "https://github.com/docker/login-action@v1"
with:
registry: ${{env.REGISTRY}}
username: ${{gitea.actor}}
password: ${{secrets.PACKAGES_TOKEN}}
- name: Build image
run: |
docker build --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest .
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest

View File

@ -2,23 +2,16 @@ FROM golang:1.23.2
WORKDIR /app WORKDIR /app
RUN useradd runner -r -u 1001 -d /app COPY *.go ./
RUN chown -R runner:runner /app
USER runner
COPY *.mod ./ COPY *.mod ./
COPY *.sum ./ COPY *.sum ./
RUN go mod download
COPY *.go ./
COPY Makefile ./
COPY lib ./lib COPY lib ./lib
COPY log ./log COPY log ./log
COPY public ./public COPY public ./public
COPY routes ./routes COPY routes ./routes
COPY templates ./templates COPY templates ./templates
RUN make RUN go build .
ENTRYPOINT ["/app/tracker"] ENTRYPOINT ["/app/tracker"]

View File

@ -1,7 +1,4 @@
# tracker | MatterLinux package tracker # tracker | MatterLinux package tracker
![](https://git.matterlinux.xyz/matter/tracker/actions/workflows/docker.yml/badge.svg)
Soruce code of MatterLinux's package tracker, located at Soruce code of MatterLinux's package tracker, located at
[tracker.matterlinux.xyz](https://tracker.matterlinux.xyz) [tracker.matterlinux.xyz](https://tracker.matterlinux.xyz)
@ -42,19 +39,23 @@ official MatterLinux 24 repos:
``` ```
### Deployment ### Deployment
Web server can be deployed with docker compose using the following configuration file: Web server can be built and deployed with docker compose using the following
configuration file:
```yaml ```yaml
version: "3"
services: services:
tracker: tracker:
container_name: mattertracker image: mattertracker
image: git.matterlinux.xyz/matter/tracker restart: unless-stopped
build:
context: ./
ports: ports:
- "127.0.0.1:9877:9877" - "127.0.0.1:9877:9877"
volumes: volumes:
- "./config.json:/app/config.json:ro" - "./config.json:/app/config.json:ro"
restart: unless-stopped
``` ```
After saving the configuration file, you can run the docker container: After saving the configuration file, you can build and run the docker container:
```bash ```bash
docker-compose up -d docker-compose up -d
``` ```