{"id":17651080,"url":"https://github.com/tilap/docker-js-playground","last_synced_at":"2026-01-19T22:31:35.639Z","repository":{"id":36076384,"uuid":"221326060","full_name":"tilap/docker-js-playground","owner":"tilap","description":"Basic docker js app + website + api + static bare arch over docker","archived":false,"fork":false,"pushed_at":"2023-01-05T00:47:40.000Z","size":2041,"stargazers_count":2,"open_issues_count":40,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T03:47:50.177Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tilap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-12T22:42:47.000Z","updated_at":"2019-11-20T17:19:40.000Z","dependencies_parsed_at":"2023-01-16T13:01:27.678Z","dependency_job_id":null,"html_url":"https://github.com/tilap/docker-js-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tilap/docker-js-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Fdocker-js-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Fdocker-js-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Fdocker-js-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Fdocker-js-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilap","download_url":"https://codeload.github.com/tilap/docker-js-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilap%2Fdocker-js-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28587240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2024-10-23T11:40:12.806Z","updated_at":"2026-01-19T22:31:35.623Z","avatar_url":"https://github.com/tilap.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-js-playground\n\nQuick bare product playground for docker deployment.\n\nFor a given `domain.tld`, it provides:\n\n- domain.tld: a static html website\n- domain.tld/api: an api use by every apps\n  - [GET] domain.tld/api/ : stupid json to say it's ok\n  - [GET] domain.tld/api/insert : insert an item { date: [timestamp] }\n  - [GET] domain.tld/api/get : fetch all items\n- *.domain.tld: react app with a call on the api to retrieve data and a button to insert data (best killer app ever)\n\nQuick techstack overview:\n\n- api: a single api based on koajs\n- frontend: a client-side website based on create-react-app, empowered with craco\n- homepage: a static dummy html website\n- a nginx reverse proxy to rule all the websites\n- database: a simple mongo\n\n## Usage\n\n### Production\n\n#### Quick start\n\nMake sure to have docker \u0026 docker-compose installed on your computer.\n\nAdd a domain name and some subdomains in your /etc/hosts. For example:\n\n```sh\n127.0.0.1 tralala.io\n127.0.0.1 site1.tralala.io\n127.0.0.1 site2.tralala.io\n```\n\nThen:\n\n```sh\ngit clone https://github.com/tilap/docker-js-playground.git\ncd docker-js-playground\ndocker-compose build\nDOMAIN=tralala.io docker-compose up\n```\n\nYou're done. Then visit:\n\n- http://tralala.io =\u003e static website\n- http://tralala.io/api =\u003e to access the api (/api/get and /api/insert)\n- http://site1.tralala.io/, http://site2.tralala.io/\n\nThe \"site\" app (site1.domain.tld for example) provides a client side nav with a page fetching data from the server and a button to insert a row in the database.\n\n### Development\n\nTo dev on this stack, an extra docker-compose file is provided (docker-compose.dev.yml) to make dev env works.\n\nOnce the repo clonse, you can run\n\n```sh\ndocker-compose -f docker-compose.yml -f docker-compose.dev.yml build\nDOMAIN=tralala.io docker-compose -f docker-compose.yml -f docker-compose.dev.yml up\n```\n\nThen for:\n\n- **frontend**: go in the apps/frontend, yarn install and yarn start. Any local change will be live reloaded\n- **homepage**: go in the apps/homepage/src. Any change will be take into account on homepage reload (no live reload yet)\n- **api**: TODO\n\n### Other build options\n\nEnv vars when uping your docker-compose:\n\n- `DOMAIN`: (default domain.tld): a domain (or subdomain)\n- `LOGS_PATH` (default ./logs): local folder where logs will be stored\n- `MONGO_PATH` (default ./data/mongo): local folder where mongo data will be stored\n\n## Out of the scope of the project\n\nThis is a bare project made of almost nothing. Code is just a minimal one, the important part is the docker playground, apps are just there to make it understanable :)\n\n## Ideas for later?\n\nIdea is not about code stack (js), but about docker stack.\n\n- [ ] Add USER in dockerfiles (instead of root)\n- [X] Expand docker-compose.yml for and dev env (and duplicate nginx.production.conf for a dev.nginx.conf)\n- [ ] Add letsencrypt for domains, subdomains and so on\n- [ ] Add a github action to trigger a deploy on remote server\n- [ ] (?) Move api expose as a graphql\n- [ ] (?) Add a [docker-weblate](https://github.com/beevelop/docker-weblate) docker image to manage translation of the apps\n- [ ] (?) Split the apps over many repos\n\n## LICENSE\n\nJust do what you fucking want with that repo :x","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilap%2Fdocker-js-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilap%2Fdocker-js-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilap%2Fdocker-js-playground/lists"}