GithubHelp home page GithubHelp logo

lichess-org / lila-docker Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 31.0 1.44 MB

Lichess local development using Docker Compose.

License: GNU Affero General Public License v3.0

Dockerfile 9.42% Shell 15.05% HTML 5.21% Python 4.34% Rust 65.99%
docker docker-compose lichess

lila-docker's People

Contributors

amitdash291 avatar belluu avatar carbrex avatar fitztrev avatar juesto avatar kraktus avatar tors42 avatar trevorbayless avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lila-docker's Issues

docker start getting killed automatically on mac

No idea about scala and how it runs but I installed docker on my mac and cloned this repo
When I run this command
lila-docker git:(main) ./lila-docker start
it takes a while and seems to be going to good but after a bit I see this error

lila-1  | [info] done compiling
lila-1  | [info] compiling 7 Scala sources to /lila/modules/appeal/target/scala-3.4.1/classes ...
lila-1  | [info] done compiling
lila-1  | [info] compiling 6 Scala sources to /lila/modules/playban/target/scala-3.4.1/classes ...
lila-1  | Killed
lila-1 exited with code 0
image I have a decent machine image

Should I allocate more memory to docker or something on those lines?

Content Security Policy console errors

  1. Visit http://localhost:8080/forum

See console error:

Refused to load the font 'data:application/octet-stream;....'
because it violates the following Content Security Policy directive:
"font-src 'self' localhost:8080".
  1. Visit http://localhost:8080/patron

See console error:

Refused to execute inline script because it violates the following Content Security Policy directive:
"script-src https://*.paypal.com https://*.stripe.com 'nonce-nAz29QMpZzMbeetZjks5zcwp' 'self' localhost:8080".
Either the 'unsafe-inline' keyword, a hash ('sha256-b+mf6EIMFYxuAIdk6/2IF09zTUsJrlW6qZaw4opG6QU='), or a nonce ('nonce-...') is required to enable inline execution.

Allow custom ports

For each port that gets exposed to the host OS, allow it to be customized in case it's already in use.

ports:
-  - 8080:80
+  - ${LILA_PORT:-8080}:80

Python error when trying to setup mobile

I am setting up local docker for flutter mobile app and seeing the following error

 => [python internal] load build definition from python.Dockerfile                                                              0.0s
 => => transferring dockerfile: 231B                                                                                            0.0s
 => [ui internal] load build definition from ui.Dockerfile                                                                      0.0s
 => => transferring dockerfile: 383B                                                                                            0.0s
 => ERROR [python internal] load metadata for docker.io/library/python:3.12.3-alpine3.19                                        0.1s
 => ERROR [ui internal] load metadata for docker.io/library/node:20.12.2-bookworm-slim                                          0.1s
 => ERROR [python internal] load metadata for docker.io/library/eclipse-temurin:22_36-jdk-alpine                                0.1s
------
 > [python internal] load metadata for docker.io/library/python:3.12.3-alpine3.19:
------
------
 > [ui internal] load metadata for docker.io/library/node:20.12.2-bookworm-slim:
------
------
 > [python internal] load metadata for docker.io/library/eclipse-temurin:22_36-jdk-alpine:
------
failed to solve: node:20.12.2-bookworm-slim: failed to resolve source metadata for docker.io/library/node:20.12.2-bookworm-slim: error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH, out: ``

Do i need specific version of python or node? I have node v22.0.0 not sure why the error is specifying other node version.

Lila PR preview sites

Support a link that, when clicked, will start a gitpod instance but with a PR's branch checked out instead of master. Will allow others to test a PR easily.

You can setup environment variables on Gitpod in the url like this:

- https://gitpod.io/#https://github.com/lichess-org/lila-docker
+ https://gitpod.io/#lila-pr=12345/https://github.com/lichess-org/lila-docker

Then, if lila-pr is set, we can fetch and checkout during setup.

git fetch upstream pull/12345/head:preview
git checkout preview

If on Gitpod environment, prompt if workspace should be public

By default, your gitpod-hosted lichess dev site is only accessible from the same browser you're logged into gitpod with. All other requests get a 401.

This causes problems for people trying to access it via code or the mobile app for instance if they're trying to use it that way.

  1. add prompt to setup cli
  2. conditionally call gitpod_public()

Image upload server error

When writing a blog post, the image upload doesn't work in the dev environment.

image

Possible picfit misconfiguration.

03:13:28.632 [error] p.c.s.n.PlayRequestHandler - Cannot invoke the action
lila.base.LilaException$$anon$1: Not Found 404 page not found
     at lila.base.LilaException$.apply(LilaException.scala:19)
     at lila.base.LilaTypes.fufail(LilaTypes.scala:21)
     at lila.base.LilaTypes.fufail$(LilaTypes.scala:8)
     at lila.Lila$.fufail(Lila.scala:3)
     at lila.memo.package$package$.fufail(package.scala:3)
     at lila.memo.PicfitApi.lila$memo$PicfitApi$picfitServer$$$_$store$$anonfun$1(Picfit.scala:95)
     at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:470)
     at scala.concurrent.BatchingExecutor$AbstractBatch.runN(BatchingExecutor.scala:134)
     at scala.concurrent.BatchingExecutor$AsyncBatch.apply(BatchingExecutor.scala:163)
     at scala.concurrent.BatchingExecutor$AsyncBatch.apply(BatchingExecutor.scala:146)

Outbound emails

I was looking to have real outbound emails for registration. I'm not sure how to configure the docker image to do this.

Development server on EC2 instance port 8080 causing problems

I deployed the development server on my EC2 instance. There is no issue accessing ports 8081 or 8025, but the main port 8080 is causing problems. Looking at the docker logs for this container this is the error.

24.4.198.26 - - [10/Feb/2024:00:42:31 +0000] "GET / HTTP/1.1" 301 0 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Mobile/15E148 Safari/604.1" "

Make token setup optional

--tokens is passed to lila-db-seed during database setup to auto create user tokens

If a password other than "password" is chosen, it should ask if tokens should be setup.

image

Workflow to reflect typescript changes?

Hi,

I love this initiative of having a gitpod environment to onboard on lichess dev.

In the doc it is stated that

UI (JS/CSS) development:
To watch for Typescript/SCSS changes and automatically recompile:
docker compose run --rm ui bash -c "/lila/ui/build -w"

Unfortunately, when I did execute this command, it seems not enough to fully reflect changes on the running website.
Basically, I have to restart lila with:

Scala development:
To restart lila (after making changes to any Scala code):

docker compose restart lila

despite my changes are not directly related to Scala code.

Did I misunderstand something?

The current dev workflow is not so satisfactory.
Basically, I was trying to debug the JS code with some console.log...
And I have to wait lots of time to see the actual effect.

I'm sure I'm missing something.

Thanks a lot!

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.