Skip to content

Commit

Permalink
fix: revert back from bun until fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Aug 25, 2024
1 parent 04f8946 commit edb0f8c
Show file tree
Hide file tree
Showing 6 changed files with 12,035 additions and 140 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* text eol=lf
*.lockb binary diff=lockb
* text eol=lf
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Stage 0:
# Build the frontend
FROM --platform=$TARGETOS/$TARGETARCH oven/bun:alpine
FROM --platform=$TARGETOS/$TARGETARCH node:lts-alpine
WORKDIR /app
COPY . ./
RUN bun i --frozen-lockfile \
&& bun ship
RUN apk add --no-cache --update git \
&& npm install -g turbo \
&& npm ci \
&& npm run ship

# Stage 1:
# Build the actual container with all of the needed PHP dependencies that will run the application.
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Pyrodactyl is the Pterodactyl-based game server management panel that focuses on

### Prerequisites

- [Bun](https://bun.sh/) - Make sure you follow the instructions after installing to refresh your shell, so that you can use the `bun` command
- Latest LTS version of NodeJS
- Git

### Linux

Expand All @@ -66,8 +67,7 @@ tar -xzf main.tar.gz --strip-components=1 -C /var/www/pterodactyl pyrodactyl-mai
chmod -R 755 storage/* bootstrap/cache/

# Install dependencies & build panel
bun i --frozen-lockfile
bun ship
npm ci && npm run ship
```

Proceed with the rest of the installation as you would with the official panel.
Expand All @@ -84,21 +84,21 @@ It is not currently possible to run Pyrodactyl in a **production environment** o
Pyrodactyl is the world's first Pterodactyl panel that can be developed and run locally (with Wings) on Windows machines through [Vagrant](https://www.vagrantup.com/). Verify you have met the prerequisites above, then follow the steps below.

1. Clone the Pyrodactyl panel repository
1. Run `bun i` to install all the packages necessary.
1. Run `bun ship` to build Pyrodactyl. This will cache the results of the build and upload sourcemaps to Sentry. Subsequent builds without code changes will finish in milliseconds.
1. Run `npm i` to install all the packages necessary.
1. Run `npm run ship` to build Pyrodactyl. This will cache the results of the build and upload sourcemaps to Sentry. Subsequent builds without code changes will finish in milliseconds.
1. Run `vagrant up`. This will setup wings and the necessary services in order to run Pyrodactyl's databases, services, and app. This process could take up to 15 minutes.
1. Once you receive a message that says "Pyrodactyl is now up and running at localhost:3000", visit that URL in your browser and login with the default credentials provided in your console. **It's important that you use localhost to connect to Pyrodactyl! If you use 127.0.0.1, you will run into CORS issues and other issues that will not be fixed.**
1. Visit https://localhost:3000/admin to provision your first server on Pyrodactyl!

### Notes about Local Development on Windows

- If you have the dev server running (`bun dev`), a development build of the app will be served at localhost:3000 with HMR. If you want to preview a production build of Pyrodactyl, terminate the dev server and run `bun ship`. Once it finishes, it will also be served at localhost:3000.
- If you have the dev server running (`npm run dev`), a development build of the app will be served at localhost:3000 with HMR. If you want to preview a production build of Pyrodactyl, terminate the dev server and run `npm run ship`. Once it finishes, it will also be served at localhost:3000.

- If you're running the development server or have built a production version of Pyrodactyl, but visiting localhost:3000 hangs permanently, ensure you don't have any other apps or games open that may interfere with any of the ports in the Vagrantfile. For example, Steam may use port 8080, or another development server may be using a port used by Pyrodactyl. Run `vagrant reload` to re-point ports to your virtual machine after ensuring nothing may be using it, and try again.

- If you receive a message like `Vagrant was unable to mount VirtualBox shared folders`, you [may need to install the vbguest plugin for VirtualBox](https://stackoverflow.com/a/48569055/11537010) with `vagrant plugin install vagrant-vbguest`. If it's already installed, run `vagrant plugin update vagrant-vbguest`.

- We recommend setting up [Remote Caching via turbo](https://turbo.build/repo/docs/core-concepts/remote-caching). When you run `bun ship` on your local development machine, its results will be cached and uploaded, allowing you to finish a build on your production server in milliseconds.
- We recommend setting up [Remote Caching via turbo](https://turbo.build/repo/docs/core-concepts/remote-caching). When you run `npm run ship` on your local development machine, its results will be cached and uploaded, allowing you to finish a build on your production server in milliseconds.

- We do not recommend using Hyper-V as your virtualization layer. If your Vagrant installation asks you for a password, this is because you used Hyper-V. The password will be your Windows password.
- We recommend using VMWare Workstation or VirtualBox instead.
Expand Down Expand Up @@ -134,8 +134,8 @@ Afterwards, start it:
Using [Vagrant](https://www.vagrantup.com) on Linux is incredibly simple. Verify you met the prerequsites above, then follow these simple steps:

1. Clone the Pyrodactyl panel repository
2. Run `bun i` to install all required packages
3. Run `bun ship` to build Pyrodactyl. This will cache the results of the build and upload sourcemaps to Sentry. Subsequent builds without code changes will finish in milliseconds.
2. Run `npm i` to install all required packages
3. Run `npm run ship` to build Pyrodactyl. This will cache the results of the build and upload sourcemaps to Sentry. Subsequent builds without code changes will finish in milliseconds.

> [!IMPORTANT]
> In order for `vagrant up` to work, your files must be in the `/var/www/pterodactyl` directory unless manually changed in the `Vagrantfile`!
Expand Down
Binary file removed bun.lockb
Binary file not shown.
Loading

0 comments on commit edb0f8c

Please sign in to comment.