Skip to content

Commit d9837cd

Browse files
authored
fix: Github Codespaces (#62)
* fix: Fix some issues in latest release * fix: Fix broken devcontainers on github codespaces * fix: Remove unused programs from devcontainers * fix: Add vi to installed programs * fix: Fix some small errors in docs * wip: Start to rewrite the tick loop using tokio * Revert "wip: Start to rewrite the tick loop using tokio" This reverts commit 598217b. * feat: Switch to using nano instead of vi
1 parent d0857fb commit d9837cd

7 files changed

Lines changed: 17 additions & 20 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN pacman-key --init
99
RUN pacman -Syu --noconfirm
1010

1111
# Install required packages
12-
RUN pacman -S base-devel git openssh nano protobuf rustup jdk21-openjdk gradle mkdocs-material --noconfirm
12+
RUN pacman -S base-devel git less nano openssh nano protobuf rustup jdk21-openjdk gradle mkdocs-material --noconfirm
1313

1414
# Install gRPC UI
1515
RUN aur-install grpcui-bin
@@ -23,14 +23,8 @@ ENV HOME=/home/${REMOTE_USER}
2323

2424
USER ${REMOTE_USER}
2525

26-
# Install Rustup and set default toolchains
27-
RUN rustup default nightly
28-
29-
# Install binstall
30-
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
26+
# Switch to nano as default editor
27+
ENV EDITOR=nano
3128

32-
# Add $HOME/.cargo/bin to PATH
33-
ENV PATH="/root/.cargo/bin:${PATH}"
34-
35-
# Install wasm-tools
36-
RUN cargo binstall wasm-tools --no-confirm
29+
# Install Rustup and set default toolchains
30+
RUN rustup default nightly

.devcontainer/devcontainer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"dockerFile": "Dockerfile",
44
"build": {
55
"args": {
6-
"REMOTE_USER": "${localEnv:USER}",
6+
"REMOTE_USER": "${localEnv:USER:code}",
77
"REMOTE_UID": "${localEnv:REMOTE_UID:1000}",
88
"REMOTE_GID": "${localEnv:REMOTE_GID:1000}"
99
}
@@ -31,5 +31,6 @@
3131
"github.vscode-github-actions"
3232
]
3333
}
34-
}
34+
},
35+
"remoteUser": "${localEnv:USER:code}"
3536
}

clients/jvm/paper/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ tasks {
6363
fun getFullVersion(): String {
6464
val commit = System.getenv("CURRENT_COMMIT") ?: "unknown"
6565
val build = System.getenv("CURRENT_BUILD") ?: "0"
66-
return "${project.properties["client_version"]}-alpha.$commit+build.$build"
66+
return "${project.properties["client_version"]}.$commit+build.$build"
6767
}

controller/src/application.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,6 @@ impl Controller {
113113
info!("<red>Stopping</> all units...");
114114
self.units.stop_all_instant();
115115

116-
// Let the drivers cleanup there messes
117-
info!("Letting the drivers <red>cleanup</>...");
118-
self.drivers.cleanup();
119-
120116
// Stop network stack
121117
info!("<red>Stopping</> network stack...");
122118
network_handle.shutdown();
@@ -127,6 +123,10 @@ impl Controller {
127123
.take()
128124
.unwrap()
129125
.shutdown_timeout(SHUTDOWN_WAIT);
126+
127+
// Let the drivers cleanup there messes
128+
info!("Letting the drivers <red>cleanup</>...");
129+
self.drivers.cleanup();
130130
}
131131

132132
pub fn request_stop(&self) {

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
- "12892:12892"
1111
environment:
1212
- PTERODACTYL=true
13+
- LOCAL=true
1314
volumes:
1415
- ./run/logs:/app/logs
1516
- ./run/auth:/app/auth

docs/controller/installation/docker.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ Next, add the following content to the file:
1111
```yaml
1212
services:
1313
controller:
14-
image: ghcr.io/httprafa/atomic-cloud:v0.3.0-alpha
14+
image: ghcr.io/httprafa/atomic-cloud:latest
1515
ports:
1616
- "12892:12892"
1717
environment:
1818
- PTERODACTYL=true # Enable Pterodactyl driver installation
19+
- LOCAL=true # Enable Local driver installation
1920
volumes:
2021
- ./logs:/app/logs
2122
- ./auth:/app/auth

drivers/local/templates/papermc/startup/windows.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ if (Test-Path $PropertiesFile) {
2121
Set-Content $PropertiesFile -Value "server-port=$Port"
2222
}
2323

24-
java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true -jar $env:SERVER_JARFILE nogui
24+
java -Xms128M -XX:MaxRAMPercentage=95.0 -jar $env:SERVER_JARFILE nogui

0 commit comments

Comments
 (0)