Force OpenGL compatible profile for the Docker compose config (#228)

This commit is contained in:
sergystepanov 2020-09-19 06:52:12 +03:00 committed by GitHub
parent b9dc56d85a
commit fdbeb32303
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

3
README.md vendored
View file

@ -40,7 +40,7 @@ Direct play an existing game: **[Pokemon Emerald](https://cloudretro.io/?id=4a50
Install Golang https://golang.org/doc/install . Because the project uses GoModule, so it requires Go1.11 version.
### (All) Install Dependencies
### Install Dependencies
* Install [libvpx](https://www.webmproject.org/code/), [libopus](http://opus-codec.org/), [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/), [sdl2](https://wiki.libsdl.org/Installation)
```
@ -64,6 +64,7 @@ Because the coordinator and workers need to run simultaneously. Workers connect
* `go run cmd/worker/main.go --coordinatorhost localhost:8000` - spawn workers connecting to coordinator
__Additionally, you may install and configure an `X Server` display in order to be able to run OpenGL cores.__
__See the `docker-compose.yml` file for Xvfb example config.__
## Run with Docker

5
docker-compose.yml vendored
View file

@ -7,10 +7,11 @@ services:
container_name: cloud-game-local
privileged: true
environment:
- DISPLAY=:0
- DISPLAY=:99
- MESA_GL_VERSION_OVERRIDE=3.3
# network_mode: "host"
command: >
bash -c "coordinator --v=5 & xvfb-run -s '-screen 0 1x1x24' worker --coordinatorhost localhost:8000"
bash -c "Xvfb :99 & coordinator --v=5 & worker --coordinatorhost localhost:8000"
ports:
- "8000:8000"
- "9000:9000"