Giter Site home page Giter Site logo

screeps-server's Introduction

Docker Pulls

This is an alternative to screepers/screeps-launcher

Why?

I believe that build and setup should happen during the build of a docker image. The screepers/screeps-launcher does all setup and installation during the run of the image.

This image does all installation and setup during the build stage. So to launch the server, it will only start the server. Mods and bots are managed at startup by checking your config.yml. npm is only invoked if changes are made to your config.yml.

Getting started

Prerequisites

A working Docker installation. You can use Docker Desktop

Setup

Download the [./docker-compose.yml](compose file), ./.env.sample and ./config.yml file to your computer. You can put this in your Screeps project. Copy .env.sample to .env, this can hold secrets for you, and should be ignored in git!

You can use this command (in a shell) to do the above, in your current directory.

curl --remote-name-all https://raw.githubusercontent.com/Jomik/screeps-server/main/{docker-compose.yml,.env.sample,config.yml} && cp .env.sample .env && echo ".env" >> .gitignore

Paste your Steam API key into .env.

Configuration

Edit config.yml to add mods and bots. Some mods also look there for configuration. We currently add the following mods, as default:

Starting the server

In your project run docker compose up -d. Run docker compose logs screeps -f to view and follow the logs for the screeps-server container. To stop following the logs, press CTRL + C. Assuming nothing went wrong, you should be able to connect to your server on http://localhost:21025.

Accessing the CLI

Run docker compose exec screeps cli.

It is also possible to access the from outside the container via a REST API. This can be accomplished using screepsmod-cli. Simply add it to your config.yml and configure it appropriately according to the readme.

Updating

Ensure that your setup applies to any new prerequisites listed above. Run docker compose pull to download any new version of the image.

Troubleshooting

  • Help, my server is running but I can't connect.

  • I can't push any code via rollup to my server.

    • Make sure your screeps.json configuration in your project is set properly.
    • In your email: field, simply put in your username. Verify your password is the same as your screepsmod-auth setting.
  • My map is all red, I can't actually spawn in!

    • This is most likely a result of your map not loaded properly on first-run. To fix it do the following.

      • Step 1: Navigate to your server file location in terminal/powershell.
      • Step 2: Run docker compose exec screeps cli
      • Step 3: Run system.resetAllData() and reconnect.
    • Restart your server, check your configuration and follow the instructions for screepsmod-admin-utils

screeps-server's People

Contributors

carsonburke avatar dependabot[bot] avatar jomik avatar mkaulfers avatar tiennou avatar

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.