mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-12 19:20:06 +00:00
unknown
d7445e0f0f
- loginMetadata is passed to shards through redis now - shards announce they're alive via redis.AnnounceShard() which just populates a hashset keyed 'shards' - login servers grab the 'shards' hashset and randomly picks a shard to pass the player to (for now) - ./service shard && ./service login - Many new environment variables, check config/config.go for more info. or for a tl;dr just read the Dockerfile for the required ones - Shard and login services now run in different processes ! (and containers?? wooaaah)
43 lines
859 B
YAML
43 lines
859 B
YAML
|
|
services:
|
|
postgresql:
|
|
image: 'postgres:15'
|
|
environment:
|
|
- POSTGRES_USER=gopenfusion
|
|
- POSTGRES_DB=gopenfusion
|
|
- POSTGRES_PASSWORD=gopenfusion
|
|
redis:
|
|
image: 'redis:7-alpine'
|
|
login:
|
|
restart: on-failure
|
|
build: .
|
|
hostname: login
|
|
command: login
|
|
environment:
|
|
- DB_ADDR=postgresql:5432
|
|
- DB_USER=gopenfusion
|
|
- DB_PASS=gopenfusion
|
|
- DB_NAME=gopenfusion
|
|
- REDIS_ADDR=redis:6379
|
|
ports:
|
|
- '23000:23000'
|
|
links:
|
|
- postgresql
|
|
- redis
|
|
shard0:
|
|
restart: on-failure
|
|
build: .
|
|
hostname: shard
|
|
command: shard
|
|
environment:
|
|
- DB_ADDR=postgresql:5432
|
|
- DB_USER=gopenfusion
|
|
- DB_PASS=gopenfusion
|
|
- DB_NAME=gopenfusion
|
|
- REDIS_ADDR=redis:6379
|
|
ports:
|
|
- '23001:23001'
|
|
links:
|
|
- postgresql
|
|
- redis
|