forked from openmultiplayer/web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
78 lines (65 loc) · 1.68 KB
/
Taskfile.yml
File metadata and controls
78 lines (65 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
version: 3
tasks:
default:
deps: [build]
cmds:
- ./server.exe
sources:
- server/**/*.go
build:
cmds:
- go build -o server.exe -ldflags="-X 'github.com/openmultiplayer/web/server/src/version.Version={{.VERSION}}'" ./server/
vars:
VERSION:
sh: git describe --always --dirty --tags
# Production deployment run - migrate DB first, then
production:
cmds:
- npx prisma migrate deploy
- ./server.exe
deploy:
cmds:
- docker compose up --detach
services:
cmds:
- docker-compose -f docker-compose.dev.yml up -d
generate:
cmds:
# Calling the Go generator from the Prisma CLI is not supported yet...
# - npx @prisma/cli generate
# so we call it directly:
- go run github.com/prisma/prisma-client-go generate
# Also generate TypeScript type declarations from some backend structs.
- go run types.go
docsindex:
cmds:
- go run ./server/indexbuilder/main.go
migrate:
cmds:
- npx prisma migrate dev
dbuild:
cmds:
- docker build -t southclaws/openmp-index .
- docker build -t southclaws/openmp-frontend -f Dockerfile.frontend .
upload-assets:
dir: frontend/public
cmds:
- mc cp --recursive images omp/assets
build-email-templates:
dir: emails
cmds:
- npm run build
# Run the web frontend and use a local API server.
web:
dir: frontend
env:
NEXT_PUBLIC_API_ADDRESS: "http://localhost:8000"
cmds:
- npm run dev
# Run the web frontend and use the live API.
web-live:
dir: frontend
env:
NEXT_PUBLIC_API_ADDRESS: "https://api.open.mp"
cmds:
- npm run dev