Closed dmikalova closed 3 years ago
Usually just having - 21025:21025
in the ports section is enough (or in your case, - 8080:21025
)
Also, you want to avoid having the ports exposed on the redis and mongo containers unless you have firewall setup to restrict them.
Thanks, that's what I would expect too so I'm still not sure why its not working. I'm just going to close this and keep trying other things.
@dmikalova What is the solution?
@geocine it's been a while since I set this up, but this is the config I have that's been working solid:
version: "3"
services:
mongodb:
image: mongo
volumes:
- ./mongo:/data/db
redis:
image: redis
screeps:
build: screeps
volumes:
- ./mods.json:/screeps/mods.json
depends_on:
- mongodb
- redis
environment:
STEAM_API_KEY: $STEAM_API_KEY
ports:
- "21025:21025"
I start it like this:
export STEAM_API_KEY="x"
docker-compose up -d
and here's mods.json:
{
"mods": [
"node_modules/screepsmod-mongo/index.js",
"node_modules/screepsmod-auth/index.js",
"node_modules/screepsmod-tickrate/index.js",
"node_modules/screepsmod-admin-utils/index.js",
"node_modules/screepsmod-features/index.js"
],
"bots": {
"simplebot": "node_modules/@screeps/simplebot/src"
}
}
I'm trying to set this up on DigitalOcean on Ubuntu 20.04 and I can't seem to get the screeps port to connect to the internet. If I try another container the port is exposed fine with netcat. But with the screeps port I can't ever connect to it outside of localhost. Am I missing something?
config.yml
docker-compose.yml - I would expect this to publish the screeps port to 8080, I haven't found any variation on this that works.
commands: