+17
apps/bot/commands/recent.ts
+17
apps/bot/commands/recent.ts
···
···
1
+
import { logger } from "@tealfmbot/common/logger";
2
+
// import {db} from "@tealfmbot/database/db"
3
+
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
4
+
5
+
export default {
6
+
data: new SlashCommandBuilder()
7
+
.setName("recent")
8
+
.setDescription(
9
+
"Show your most recently played track",
10
+
),
11
+
async execute(interaction: ChatInputCommandInteraction) {
12
+
await interaction.reply("recent");
13
+
logger.info(
14
+
`fetching recent track for ${interaction.user.username} in guild ${interaction.guildId} at ${new Date().toJSON()}`,
15
+
);
16
+
},
17
+
};
+1
apps/bot/package.json
+1
apps/bot/package.json
+1
-1
apps/tapper/index.ts
+1
-1
apps/tapper/index.ts
+7
-5
build-and-publish-images.sh
+7
-5
build-and-publish-images.sh
···
1
SHA=$(git rev-parse HEAD)
2
BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
3
VERSION=$(git describe --tags --abbrev=0)
4
REGISTRY=atcr.io/besaid.zone
5
-
DID=did:plc:qttsv4e7pu2jl3ilanfgc3zn
6
7
services=(
8
web
···
10
tapper
11
)
12
13
-
echo "building container versions: ${VERSION#v}"
14
15
for svc in ${services[@]}; do
16
docker buildx build \
17
-t $REGISTRY/discostu$svc:${VERSION#v} \
18
--target $svc \
19
--build-arg VERSION=${VERSION#v} \
20
--build-arg SHA=$SHA \
21
-
--build-arg DID=$DID \
22
--build-arg BUILD_DATE=$BUILD_DATE \
23
--pull \
24
-
--no-cache \
25
-
--push .
26
done
···
1
SHA=$(git rev-parse HEAD)
2
BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
3
+
LAST_BUILT=$(date -u +%Y%m%d)
4
VERSION=$(git describe --tags --abbrev=0)
5
REGISTRY=atcr.io/besaid.zone
6
7
services=(
8
web
···
10
tapper
11
)
12
13
+
echo "building versioned containers with version ${VERSION#v} and tagging :latest"
14
15
for svc in ${services[@]}; do
16
docker buildx build \
17
-t $REGISTRY/discostu$svc:${VERSION#v} \
18
+
-t $REGISTRY/discostu$svc:latest \
19
+
--platform linux/amd64,linux/arm64 \
20
--target $svc \
21
--build-arg VERSION=${VERSION#v} \
22
--build-arg SHA=$SHA \
23
+
--build-arg DID=did:plc:qttsv4e7pu2jl3ilanfgc3zn \
24
--build-arg BUILD_DATE=$BUILD_DATE \
25
--pull \
26
+
--no-cache .
27
+
# --push .
28
done
+4
-3
docker-compose.prod.yml
+4
-3
docker-compose.prod.yml
···
1
services:
2
web:
3
container_name: web
4
restart: always
5
build:
6
context: .
7
-
dockerfile: Dockerfile
8
target: web
9
ports:
10
- 8002:8002
···
29
container_name: tapper
30
build:
31
context: .
32
-
dockerfile: Dockerfile
33
target: tapper
34
35
depends_on:
···
44
restart: always
45
build:
46
context: .
47
-
dockerfile: Dockerfile
48
target: bot
49
50
depends_on:
···
1
+
name: "Disco Stu Compose - Prod"
2
services:
3
web:
4
container_name: web
5
restart: always
6
build:
7
context: .
8
+
dockerfile: atcr.io/besaid.zone/discostuweb:1.0
9
target: web
10
ports:
11
- 8002:8002
···
30
container_name: tapper
31
build:
32
context: .
33
+
dockerfile: atcr.io/besaid.zone/discostutapper:1.0
34
target: tapper
35
36
depends_on:
···
45
restart: always
46
build:
47
context: .
48
+
dockerfile: atcr.io/besaid.zone/discostubot:1.0
49
target: bot
50
51
depends_on:
+53
justfile
+53
justfile
···
···
1
+
sha := `git rev-parse HEAD`
2
+
build_date := `date -u +%Y-%m-%dT%H:%M:%SZ`
3
+
registry := "atcr.io/besaid.zone"
4
+
5
+
default:
6
+
@just --list
7
+
8
+
release:
9
+
#!/usr/bin/env bash
10
+
VERSION=$(git describe --tags --abbrev=0)
11
+
services=(
12
+
web
13
+
tapper
14
+
bot
15
+
)
16
+
17
+
echo "building versioned containers with version ${VERSION#v} and tagging :latest"
18
+
19
+
for svc in ${services[@]}; do
20
+
docker buildx build \
21
+
-t "{{registry}}"/discostu$svc:${VERSION#v} \
22
+
-t "{{registry}}"/discostu$svc:latest \
23
+
--target $svc \
24
+
--build-arg VERSION=${VERSION#v} \
25
+
--build-arg SHA="{{sha}}" \
26
+
--build-arg DID=did:plc:qttsv4e7pu2jl3ilanfgc3zn \
27
+
--build-arg BUILD_DATE="{{build_date}}" \
28
+
--pull \
29
+
--no-cache \
30
+
--push .
31
+
done
32
+
33
+
latest:
34
+
#!/usr/bin/env bash
35
+
VERSION=$(git describe --tags --abbrev=0)
36
+
services=(
37
+
web
38
+
tapper
39
+
bot
40
+
)
41
+
42
+
for svc in ${services[@]}; do
43
+
docker buildx build \
44
+
-t "{{registry}}"/discostu$svc:latest \
45
+
--target $svc \
46
+
--build-arg VERSION=${VERSION#v} \
47
+
--build-arg SHA="{{sha}}" \
48
+
--build-arg DID=did:plc:qttsv4e7pu2jl3ilanfgc3zn \
49
+
--build-arg BUILD_DATE="{{build_date}}" \
50
+
--pull \
51
+
--no-cache \
52
+
--push .
53
+
done
+4
-3
packages/database/database.d.ts
+4
-3
packages/database/database.d.ts
+3
pnpm-lock.yaml
+3
pnpm-lock.yaml