Skip to content

Commit aba3aac

Browse files
committed
chore: init core
1 parent 14d701f commit aba3aac

7 files changed

Lines changed: 26 additions & 101 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,10 @@ run-name: Triggered by ${{ github.event_name }} to ${{ github.ref }} by @${{ git
44
on: [push]
55

66
jobs:
7-
web_build_job:
8-
runs-on: ubuntu-latest
9-
name: web
10-
defaults:
11-
run:
12-
shell: bash
13-
steps:
14-
- uses: actions/checkout@v4
15-
with:
16-
submodules: true
17-
- name: Setup Node
18-
uses: actions/setup-node@v4
19-
with:
20-
node-version: '22.x'
21-
- name: Web
22-
run: |
23-
cd web
24-
npm ci
25-
npm run build
267

27-
go_build_job:
8+
core_build_job:
289
runs-on: ubuntu-latest
29-
name: sentinel
10+
name: core
3011
defaults:
3112
run:
3213
shell: bash
@@ -38,7 +19,7 @@ jobs:
3819
uses: actions/setup-go@v4
3920
with:
4021
go-version: '1.22.0'
41-
- name: Sentinel
22+
- name: Build sentinel-core
4223
run: |
4324
go get .
4425
go build

.github/workflows/tests.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ clean:
66
rm *.out
77
rm coverage.html
88

9-
run:
10-
chmod +x scripts/run.sh
11-
./scripts/run.sh
9+
run-core:
10+
chmod +x scripts/run-core.sh
11+
./scripts/run-core.sh
1212

1313
keygen:
1414
chmod +x scripts/keygen.sh

core/go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/gaucho-racing/sentinel/core
2+
3+
go 1.25.6

core/main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package main
2+
3+
import "fmt"
4+
5+
func main() {
6+
fmt.Println("Hello, World!")
7+
}

docker-compose.yml

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,13 @@ name: sentinel
33
services:
44
db:
55
container_name: db
6-
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
7-
platform: linux/amd64
8-
restart: unless-stopped
9-
volumes:
10-
- s2data:/data
11-
- ./init.sql:/init.sql
12-
ports:
13-
- "3306:3306"
14-
- "8080:8080"
15-
- "9000:9000"
16-
environment:
17-
ROOT_PASSWORD: "password"
18-
19-
sentinel:
20-
container_name: sentinel
21-
depends_on:
22-
- db
23-
image: gauchoracing/sentinel:latest
24-
restart: unless-stopped
25-
ports:
26-
- "${PORT}:${PORT}"
6+
image: postgres:18-alpine
277
environment:
28-
ENV: $ENV
29-
PORT: $PORT
30-
PREFIX: $PREFIX
31-
DATABASE_HOST: $DATABASE_HOST
32-
DATABASE_PORT: $DATABASE_PORT
33-
DATABASE_USER: $DATABASE_USER
34-
DATABASE_PASSWORD: $DATABASE_PASSWORD
35-
DATABASE_NAME: $DATABASE_NAME
36-
DISCORD_TOKEN: $DISCORD_TOKEN
37-
DISCORD_GUILD: $DISCORD_GUILD
38-
DISCORD_LOG_CHANNEL: $DISCORD_LOG_CHANNEL
39-
DISCORD_CLIENT_ID: $DISCORD_CLIENT_ID
40-
DISCORD_CLIENT_SECRET: $DISCORD_CLIENT_SECRET
41-
DISCORD_REDIRECT_URI: $DISCORD_REDIRECT_URI
42-
DRIVE_SERVICE_ACCOUNT: $DRIVE_SERVICE_ACCOUNT
43-
GITHUB_PAT: $GITHUB_PAT
44-
WIKI_TOKEN: $WIKI_TOKEN
45-
AUTH_SIGNING_KEY: $AUTH_SIGNING_KEY
46-
DRIVE_CRON: $DRIVE_CRON
47-
GITHUB_CRON: $GITHUB_CRON
48-
WIKI_CRON: $WIKI_CRON
8+
POSTGRES_USER: postgres
9+
POSTGRES_PASSWORD: password
10+
POSTGRES_DB: sentinel
11+
volumes:
12+
- pgdata:/var/lib/postgresql
4913

5014
volumes:
51-
s2data:
15+
pgdata:

scripts/run.sh renamed to scripts/run-core.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

33
# check if go.mod exists in current directory
4-
if [ ! -f go.mod ]; then
5-
echo "go.mod not found"
4+
if [ ! -f core/go.mod ]; then
5+
echo "core/go.mod not found"
66
echo "Please make sure you are in the root sentinel directory"
77
exit 1
88
fi
@@ -17,5 +17,6 @@ fi
1717

1818
set -a
1919
. .env
20+
cd core
2021
go get .
2122
go run main.go

0 commit comments

Comments
 (0)