guilhermebkel / uno-game

:flower_playing_cards: An UNO Game made in Javascript
https://uno.guilherr.me
MIT License
207 stars 59 forks source link

Trouble running via docker #38

Open benjamin051000 opened 1 year ago

benjamin051000 commented 1 year ago

Hey! Great game.

I'm attempting to run this on my home server (raspberry pi 4) in a Docker container.

I cloned your repo, ran docker build -t uno-game:local . in the source dir, and ran the following two commands (via tmux):

pi@rpi:~/src/uno-game $ docker compose up
[+] Building 0.0s (0/0)                                                
[+] Running 1/1
 ✔ Container uno-game-redis-1  Re...                              0.8s 
Attaching to uno-game-redis-1
uno-game-redis-1  | 1:C 05 Jun 2023 03:40:30.891 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
uno-game-redis-1  | 1:C 05 Jun 2023 03:40:30.891 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
uno-game-redis-1  | 1:C 05 Jun 2023 03:40:30.891 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
uno-game-redis-1  | 1:M 05 Jun 2023 03:40:30.893 * monotonic clock: POSIX clock_gettime
uno-game-redis-1  | 1:M 05 Jun 2023 03:40:30.895 * Running mode=standalone, port=6379.
uno-game-redis-1  | 1:M 05 Jun 2023 03:40:30.895 # Server initialized
uno-game-redis-1  | 1:M 05 Jun 2023 03:40:30.895 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
uno-game-redis-1  | 1:M 05 Jun 2023 03:40:30.900 * Loading RDB produced by version 7.0.11
uno-game-redis-1  | 1:M 05 Jun 2023 03:40:30.900 * RDB age 15 seconds
uno-game-redis-1  | 1:M 05 Jun 2023 03:40:30.900 * RDB memory usage when created 0.85 Mb
uno-game-redis-1  | 1:M 05 Jun 2023 03:40:30.900 * Done loading RDB, keys loaded: 0, keys expired: 0.
uno-game-redis-1  | 1:M 05 Jun 2023 03:40:30.900 * DB loaded from disk: 0.000 seconds
uno-game-redis-1  | 1:M 05 Jun 2023 03:40:30.900 * Ready to accept connections
pi@rpi:~/src/uno-game $ docker run --name uno -p 2346:80 uno-game:local

> uno-game@0.0.0 start:unapy /uno
> lerna run start --scope @uno-game/unapy --stream

lerna notice cli v3.22.1
lerna notice filter including "@uno-game/unapy"
lerna info filter [ '@uno-game/unapy' ]
lerna info Executing command in 1 package: "npm run start"
@uno-game/unapy: > @uno-game/unapy@0.0.0 start /uno/packages/unapy
@uno-game/unapy: > node -r module-alias/register dist/index.js
@uno-game/unapy: Server is running... [PORT 80]

I get a cannot GET / error, with the console stating that it can't get rpi.local:2346.

Am I opening the right ports? What am I missing? Thank you!