{"id":27944756,"url":"https://github.com/benportner/lynchburg-server-docker","last_synced_at":"2025-05-07T12:54:24.237Z","repository":{"id":286024585,"uuid":"960108181","full_name":"BenPortner/lynchburg-server-docker","owner":"BenPortner","description":"A dockerfile for the Lynchburg Server","archived":false,"fork":false,"pushed_at":"2025-04-03T22:06:34.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T23:19:54.675Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://git.noc.ruhr-uni-bochum.de/lynchburg/lynchburg-server","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BenPortner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-03T21:49:44.000Z","updated_at":"2025-04-03T22:06:37.000Z","dependencies_parsed_at":"2025-04-03T23:20:04.473Z","dependency_job_id":"41e417ac-2eca-403d-a444-ca03dbfe2c78","html_url":"https://github.com/BenPortner/lynchburg-server-docker","commit_stats":null,"previous_names":["benportner/lynchburg-server-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenPortner%2Flynchburg-server-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenPortner%2Flynchburg-server-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenPortner%2Flynchburg-server-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenPortner%2Flynchburg-server-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenPortner","download_url":"https://codeload.github.com/BenPortner/lynchburg-server-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252882817,"owners_count":21819153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-07T12:54:23.743Z","updated_at":"2025-05-07T12:54:24.232Z","avatar_url":"https://github.com/BenPortner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Lynchburg Server Dockerfile\n\nNOTE: This is a fork of the [original repository](https://git.noc.ruhr-uni-bochum.de/lynchburg/lynchburg-docker), which seems no longer maintained.\n\n[Project Lynchburg](https://git.noc.ruhr-uni-bochum.de/lynchburg/lynchburg-page)  \nhttps://git.noc.ruhr-uni-bochum.de/lynchburg/lynchburg-docker\n\n#### Introduction\n\nThis Dockerfile can be used to easily install the Lynchburg Server web2py application. It is fully podman compatible. You can use the container with or without a reverse proxy, but using one is recommended.\n\n#### License\n\nThe Dockerfile and helper scripts are released into the public domain. For more information check the [LICENSE](/LICENSE) file.  \nFor information about contributors goto the [Project Lynchburg landing page](https://git.noc.ruhr-uni-bochum.de/lynchburg/lynchburg-page)\n\nNOTE: The temporary workaround file [websocket_messaging.py](/files/websocket_messaging.py) is still licensed under LGPLv3 in compliance with the web2py LICENSE.\n\n#### Installation\n\n1. Build the image using ``docker build --build-arg \"ADMIN_PASSWORD=\u003cYOUR_ADMIN_PASSWORD\u003e\" -t lynchburg .``.  \n    * Additionally add another ``--build-arg \"CONTACT=\u003cCONTACT LINK\u003e\"``, if you wish to apply a link to your contact page to the contact button. By default the link is set to ``#``. Note: Adding a contact page is a legal requirement in some jurisdictions.\n    * Additionally add another ``--build-arg \"REVERSE_PROXY=false\"``, if you wish to use the container directly without a reverse proxy (not recommended). Note that using HTTPS for Lynchburg will require a lot of effort when not using a reverse proxy.\n    * Additionally add another ``--build-arg \"DB_URI=\u003cURI\u003e\"``, if you wish to use a real database instead of the default sqlite one. Valid ``\u003cURI\u003e`` strings can be found [here](http://web2py.com/book/default/chapter/06).\n1. Create a new container using ``docker create --name lynchburg lynchburg``\n    * If you want to publish the exposed ports use the ``-p`` flag when creating the container. The first number is the designated host port.\n    * ``docker create -p 80:80 -p 8888:8888 --name lynchburg lynchburg``\n1. Start the container using ``docker container start lynchburg``\n\n#### Reverse proxy\n\nThe container exposes port ``80`` as ``uswgi`` and ``8888`` as WebSocket server. Use a reverse proxy for *BOTH* ports.\nEither use ``docker network inspect bridge`` to get the container specific IP (recommended), or forward the container ports to some host port by using the ``-p`` flag when creating the container.\n\nIf you are using nginx the basic configuration should look like this:\n```\nserver {\n    listen 0.0.0.0:80;\n\n    # This is the WebSocket reverse proxy. The /realtime/ part of the URL must be forwarded too.\n    # The Host must be changed to 127.0.0.1:8888\n    # Replace the \u003cIP\u003e in proxy_pass with the container specific IP, or use a host ip:port if you used the -p flag when creating the container\n    location /realtime/ {\n        proxy_pass                  http://\u003cIP\u003e:8888;\n        proxy_http_version          1.1;\n        proxy_set_header Upgrade    $http_upgrade;\n        proxy_set_header Connection $connection_upgrade;\n        proxy_set_header Host       127.0.0.1:8888;\n        error_log                   /var/log/nginx/lynchburg_ws.err warn;\n        access_log                  /var/log/nginx/lynchburg_ws.log;\n    }\n\n    # This is the http reverse proxy\n    # Replace the \u003cIP\u003e in proxy_pass with the container specific IP, or use a host ip:port if you used the -p flag when creating the container\n    location / {\n        uwsgi_pass      \u003cIP\u003e:80;\n        include         uwsgi_params;\n        uwsgi_param     UWSGI_SCHEME $scheme;\n        uwsgi_param     SERVER_SOFTWARE nginx/$nginx_version;\n        error_log       /var/log/nginx/lynchburg.err warn;\n        access_log      /var/log/nginx/lynchburg.log;\n    }\n}\n```\n**HTTPS** should work flawlessly when using a reverse proxy. Just configure the webserver accordingly.\n\n##### Connection Upgrade\nnginx, and possibly other webservers, require a connection upgrade when using WebSockets. For nginx follow the standard practise of defining ``$http_upgrade`` and ``$connection_upgrade`` as:\n```\nmap $http_upgrade $connection_upgrade {  \n    default upgrade;\n    ''      close;\n}\n```\nPut that ``map`` block into the ``http`` block of your nginx configuration. The default file path for the nginx config is ``/etc/nginx/nginx.conf``. Alternatively, you can put that block above the ``server {`` section of you site configuration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenportner%2Flynchburg-server-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenportner%2Flynchburg-server-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenportner%2Flynchburg-server-docker/lists"}