This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: deploy
|
||||
image: docker:cli
|
||||
volumes:
|
||||
- name: docker-socket
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- docker compose up --build -d
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
|
||||
volumes:
|
||||
- name: docker-socket
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
|
||||
+6
-4
@@ -2,11 +2,13 @@ services:
|
||||
ggwp:
|
||||
build:
|
||||
context: .
|
||||
container_name: ggwp-container
|
||||
container_name: ggwp
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "4321:4321"
|
||||
# https://gist.github.com/aziis98/88af12b32d9cf3eeae3929b93146fd27
|
||||
# hash2addr "ggwp.phc.dm.unipi.it"
|
||||
- "127.195.127.102:1227:4321"
|
||||
volumes:
|
||||
- /usr/share/ggwp:/app/database.local
|
||||
- /var/lib/ggwp:/app/data.local
|
||||
environment:
|
||||
- DATABASE_FILE=database.local/ggwp.db
|
||||
- DATABASE_FILE=data.local/ggwp.db
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import type { Room, RoomData } from './model'
|
||||
import type { Question } from '@/ggwp'
|
||||
import { emitRoomUpdate } from './events'
|
||||
|
||||
const db = new Database(process.env.DATABASE_FILE ?? './database.local/ggwp.db')
|
||||
const db = new Database(process.env.DATABASE_FILE ?? './data.local/ggwp.db')
|
||||
db.pragma('journal_mode = WAL')
|
||||
db.pragma('foreign_keys = ON')
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@ describe('ggwp simple game', () => {
|
||||
} satisfies Game
|
||||
|
||||
const actions = [
|
||||
{ type: 'answer', team: 'B', question: 'Q1-1', outcome: 'partial' },
|
||||
{ type: 'answer', team: 'B', question: 'Q2-2', outcome: 'partial' },
|
||||
{ type: 'answer', team: 'A', question: 'Q1-1', outcome: 'correct' },
|
||||
{ type: 'answer', team: 'A', question: 'Q1-2', outcome: 'correct' },
|
||||
{ type: 'jolly', team: 'A', group: 'P1' },
|
||||
{ type: 'answer', team: 'C', question: 'Q1-1', outcome: 'correct' },
|
||||
{ type: 'answer', team: 'D', question: 'Q1-1', outcome: 'correct' },
|
||||
{ timestamp: '?', type: 'answer', team: 'B', question: 'Q1-1', outcome: 'partial' },
|
||||
{ timestamp: '?', type: 'answer', team: 'B', question: 'Q2-2', outcome: 'partial' },
|
||||
{ timestamp: '?', type: 'answer', team: 'A', question: 'Q1-1', outcome: 'correct' },
|
||||
{ timestamp: '?', type: 'answer', team: 'A', question: 'Q1-2', outcome: 'correct' },
|
||||
{ timestamp: '?', type: 'jolly', team: 'A', group: 'P1' },
|
||||
{ timestamp: '?', type: 'answer', team: 'C', question: 'Q1-1', outcome: 'correct' },
|
||||
{ timestamp: '?', type: 'answer', team: 'D', question: 'Q1-1', outcome: 'correct' },
|
||||
] satisfies Action[]
|
||||
|
||||
const scoreboard = computeScoreboardState(game, actions)
|
||||
|
||||
Reference in New Issue
Block a user