Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ RUN apt-get update \
pkg-config \
build-essential \
protobuf-compiler

# Create a folder for cargo target to use
RUN mkdir -p /target \
&& chown -R vscode:vscode /target
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dockerfile": "Dockerfile",
"context": "."
},
"remoteUser": "root",
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
Expand Down
4 changes: 3 additions & 1 deletion docs/infrastructure/dev-tunnel/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ Make sure to run `nix-shell` for all subsequent commands.

- Docker
- Linode API Key
- Scope: `Linodes: Read/Write, Firewall: Read/Write`

## Step 1: Create Dev Tunnel

```sh
task dev-tunnel:up
```

This will prompt you to past your Linode API token.
This will prompt you to past your Linode API token. Running this will create a
new `Nanode 1 GB` instance on Linode.

Once complete, this will print an IP to your console like:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

imports:
uploadCommons: ../../upload/common.yml
cloudCommons: ../../cloud/common.yml
uploadCommons: ../../../upload/common.yml
cloudCommons: ../../../cloud/common.yml

service:
auth: true
base-path: /cloud/games/{game_id}
base-path: /cloud/games/{game_id}/docker
path-parameters:
game_id:
type: uuid
Expand Down
5 changes: 5 additions & 0 deletions fern/definition/servers/__package__.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

imports:
commons: ../common.yml
localCommons: common.yml
49 changes: 49 additions & 0 deletions fern/definition/servers/common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

types:
Runtime:
properties:
docker: optional<DockerRuntime>

DockerRuntime:
properties:
image_id: string
args: list<string>
environment: map<string, string>
network: DockerNetwork

DockerNetwork:
properties:
mode: DockerNetworkMode
ports: map<string, DockerPort>

DockerNetworkMode:
enum:
- host
- bridge

GameGuardProtocol:
enum:
- http
- https
- tcp
- tcp_tls
- udp

DockerPort:
properties:
port: optional<integer>
routing: DockerPortRouting

DockerPortRouting:
properties:
game_guard: optional<GameGuardProtocol>
host: optional<DockerHostRouting>

DockerHostRouting:
properties:
null: unknown

Server:
properties:
null: unknown
11 changes: 11 additions & 0 deletions fern/definition/servers/datacenters/__package__.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

imports:
commons: ../common.yml

# service:
# auth: true
# base-path: /servers/datacenters
# endpoints:

# types:
20 changes: 20 additions & 0 deletions fern/definition/servers/images/__package__.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

imports:
commons: ../common.yml

service:
auth: true
base-path: /servers/docker
endpoints:
create:
path: ""
method: POST
docs: Create a new docker image.
request:
body: CreateRequest

types:
CreateRequest:
properties:
null: unknown
52 changes: 52 additions & 0 deletions fern/definition/servers/servers/__package__.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

imports:
commons: ../common.yml

service:
auth: true
base-path: /servers/servers
endpoints:
create:
path: ""
method: POST
docs: Create a new dynamic server.
request:
body: CreateRequest
response: CreateResponse
destroy:
path: "/{server_id}"
method: DELETE
docs: Destroy a dynamic server.
path-parameters:
server_id:
docs: The id of the server to destroy
type: uuid
request:
body: DestroyRequest

types:
CreateRequest:
properties:
metadata: map<string, unknown>
cluster:
docs: The name id of the cluster
type: string
datacenter:
docs: The name id of the datacenter
type: string
# resources:
# cpu:
# docs: The number of CPUs
# type: integer
# memory:
# docs: The amount of memory in MB
# type: integer
kill_timeout: integer
runtime: commons.Runtime
CreateResponse:
properties:
server: commons.Server
DestroyRequest:
properties:
kill_timeout: optional<integer>
8 changes: 5 additions & 3 deletions lib/bolt/core/src/tasks/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,14 @@ async fn exec_test(
// Convert path relative to project
let relative_path = test_binary
.path
.strip_prefix(ctx.path())
.context("path not in project")?;
.strip_prefix(ctx.cargo_target_dir())
.context(format!("path not in project: {:?}", test_binary.path))?;

let container_path = Path::new("/target").join(relative_path);

let command = format!(
"RIVET_TEST_ID={test_id} {} --exact {}",
&relative_path.display(),
&container_path.display(),
&test_binary.test_name
);

Expand Down
3 changes: 3 additions & 0 deletions sdks/full/go/client/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions sdks/full/go/cloud/games/client/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions sdks/full/go/cloud/games/docker/client/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading