Compare commits

..

No commits in common. "82f78ebb24705704d77f7ecb1a5050dcc11781ef" and "0894c420fa5fef72428fd01e5db3c1c1c474aa93" have entirely different histories.

3 changed files with 13 additions and 47 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.5
WORKDIR /app WORKDIR /app
RUN useradd runner -r -u 1001 -d /app COPY *.go ./
RUN chown -R runner:runner /app COPY *.mod ./
USER runner COPY *.sum ./
COPY *.mod ./
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/security"] ENTRYPOINT ["/app/security"]

View File

@ -1,24 +1,25 @@
# security | MatterLinux security tracker # security | MatterLinux security tracker
![](https://git.matterlinux.xyz/matter/security/actions/workflows/docker.yml/badge.svg)
Soruce code of MatterLinux's security tracker, located at Soruce code of MatterLinux's security tracker, located at
[security.matterlinux.xyz](https://security.matterlinux.xyz) [security.matterlinux.xyz](https://security.matterlinux.xyz)
### Deployment ### Deployment
Web server can be deployed with docker compose, here is an example configuration: Web server can be built and deployed with docker compose, here is an
example configuration:
```yaml ```yaml
version: "3"
services: services:
security: security:
container_name: mattersecurity image: mattersecurity
image: git.matterlinux.xyz/matter/security restart: unless-stopped
build:
context: ./
ports: ports:
- "127.0.0.1:9876:9876" - "127.0.0.1:9876:9876"
volumes: volumes:
- "./db:/app/db" - "./db:/app/db"
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
``` ```