Skip to content

Commit

Permalink
Merge pull request #25 from efrei-craft/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JiveOff authored Sep 11, 2023
2 parents 3c855dc + 575ce45 commit 07965e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions prisma/migrations/20230910175437_add_no_storage/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- AlterEnum
ALTER TYPE "StorageMode" ADD VALUE 'NONE';

-- AlterTable
ALTER TABLE "Template" ALTER COLUMN "motd" SET DEFAULT ' &e&lEFREI CRAFT &8• &61.19.3
&bBienvenue !';
1 change: 1 addition & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ enum ServerType {
enum StorageMode {
VOLUME
HOST
NONE
}

model Template {
Expand Down
4 changes: 3 additions & 1 deletion src/realms/worker/handlers/CreateServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export const method: WorkerMethod = {
if (template.static) {
if (template.storageMode === StorageMode.HOST) {
containerInfo.HostConfig.Binds = [
`${process.env.STORAGE_PATH}/${serverName}:/data:rw`
`${process.env.STORAGE_PATH}/${serverName}:/data:rw`,
`/data/plugins`,
`/data/libraries`
]
} else if (template.storageMode === StorageMode.VOLUME) {
const volumes = await docker.listVolumes()
Expand Down

0 comments on commit 07965e6

Please sign in to comment.