Giter Club home page Giter Club logo

docker-screeps-server's Introduction

Screeps Server

OUTDATED: screeps-launcher is now the recommended way of running a server

There are two different type how to start a screeps server.

Create the world

If you do not have an existing server directory, just start the Docker container with the command line argument init, and everything gets done for you.

docker run -it --rm -v $PWD:/screeps quay.io/ags131/screeps-server init

Now it's all set to run the Screeps server.

Running the server

If you have already a server directory (from previous installations) follow the steps below.

  1. Make sure you are in the server directory
  2. Run the server
docker run -d --name screeps-server -v $PWD:/screeps -p 21025:21025 quay.io/ags131/screeps-server

Managing the server

Mods

Mods can be installed by running: docker run --rm -v $PWD:/screeps quay.io/ags131/screeps-server yarn add screepsmod-auth

CLI

The CLI can be accessed by running: docker exec -it screeps-server npx screeps cli

Stopping and starting the server

Stop: docker stop screeps-server
Start: docker start screeps-server

Updating

  1. Stop the server: docker stop screeps-server
  2. Remove the server: docker rm screeps-server
  3. Follow Running the server

Launching a specific module

For more advanced usage and more control over scaling, you can launch individual modules. Note that each module may have different environment variables needed to run. docker run -d --name screeps-server-backend -v $PWD:/screeps quay.io/ags131/screeps-server@beta screeps-backend

docker-screeps-server's People

Contributors

alinanova21 avatar bboehmke avatar blizzardblue avatar davidkroell avatar wraithan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-screeps-server's Issues

Newer version available

Is there a way to run the latest version of the private server using your Docker image? I seem to be stuck at 4.0.5 even though it appears 4.1.5 is available: https://github.com/screeps/screeps/blob/master/package.json.

If it's just a matter of updating the SCREEPS_VERSION variable in the Dockerfile, then I could do a pull request if you want. But it seems there must be another step to get DockerHub to rebuild the image there, right?

Even better, is it possible to just remove the hard-coded version number so that it will always use the latest available version when it runs?

Thank you

Memory Allocation

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node-gyp]
2: 0x11e7fec [node-gyp]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node-gyp]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node-gyp]
5: v8::internal::Factory::NewUninitializedFixedArray(int) [node-gyp]
6: 0xdee3b3 [node-gyp]
7: v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [node-gyp]
8: 0x2695fd2042fd
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] install: node-gyp rebuild --release -j 4
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-10-02T03_07_49_241Z-debug.log
Install for screeps@latest failed with code 134

2018-10-02T03_07_49_241Z-debug.log:

14576 silly install [email protected]
14577 info lifecycle [email protected]~install: [email protected]
14578 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle false
14579 verbose lifecycle [email protected]~install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/root/.npm/_npx/43/lib/node_modules/screeps/node_modules/isolated-vm/node_modules/.bin:/root/.npm/_npx/43/lib/node_modules/screeps/node_modules/.bin:/root/.npm/_npx/43/lib/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
14580 verbose lifecycle [email protected]~install: CWD: /root/.npm/_npx/43/lib/node_modules/screeps/node_modules/isolated-vm
14581 silly lifecycle [email protected]~install: Args: [ '-c', 'node-gyp rebuild --release -j 4' ]
14582 silly lifecycle [email protected]~install: Returned: code: 134  signal: null
14583 info lifecycle [email protected]~install: Failed to exec install script
14584 verbose unlock done using /root/.npm/_locks/staging-d4c61f5c68559b1a.lock for /root/.npm/_npx/43/lib/node_modules/.staging
14585 warn [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
14586 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/screeps/node_modules/fsevents):
14587 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
14588 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
14588 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
14588 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
14588 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
14589 verbose stack Error: [email protected] install: `node-gyp rebuild --release -j 4`
14589 verbose stack Exit status 134
14589 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
14589 verbose stack     at emitTwo (events.js:126:13)
14589 verbose stack     at EventEmitter.emit (events.js:214:7)
14589 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
14589 verbose stack     at emitTwo (events.js:126:13)
14589 verbose stack     at ChildProcess.emit (events.js:214:7)
14589 verbose stack     at maybeClose (internal/child_process.js:925:16)
14589 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14590 verbose pkgid [email protected]
14591 verbose cwd /screeps
14592 verbose Linux 4.15.0-34-generic
14593 verbose argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "install" "screeps@latest" "--global" "--prefix" "/root/.npm/_npx/43" "--loglevel" "error" "--json"
14594 verbose node v8.11.1
14595 verbose npm  v5.6.0
14596 error code ELIFECYCLE
14597 error errno 134
14598 error [email protected] install: `node-gyp rebuild --release -j 4`
14598 error Exit status 134
14599 error Failed at the [email protected] install script.
14599 error This is probably not a problem with npm. There is likely additional logging output above.
14600 verbose exit [ 134, true ]

Happens when try to: docker exec -it screeps-server npx screeps cli

Push fresh docker image to dockerhub

Might want to push a fresh image as auto "npm update screeps" is erroring out, and only going into the image and removing screeps and reinstalling fixes it (in order to use 2.3.0 rather than 2.2.2).

Unable to start container

starting container failed: oci runtime error: container_linux.go:265: starting container process caused "exec: \"/bin/sh -c\": stat /bin/sh -c: no such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.