{"id":15524836,"url":"https://github.com/dev-rke/devenv","last_synced_at":"2025-10-19T12:45:00.675Z","repository":{"id":48386923,"uuid":"262333120","full_name":"dev-rke/devenv","owner":"dev-rke","description":"Nearly zero config cross platform development environment","archived":false,"fork":false,"pushed_at":"2024-07-04T23:21:08.000Z","size":36,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T13:55:23.399Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dev-rke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-05-08T13:38:52.000Z","updated_at":"2024-07-04T23:21:12.000Z","dependencies_parsed_at":"2024-12-08T12:26:12.686Z","dependency_job_id":"91d6fa4a-944e-4487-b0ac-c11b91db14d7","html_url":"https://github.com/dev-rke/devenv","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":0.09999999999999998,"last_synced_commit":"1dd2d91bd6cdef324b44a97b6b82fedb46b2cafd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-rke%2Fdevenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-rke%2Fdevenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-rke%2Fdevenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-rke%2Fdevenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dev-rke","download_url":"https://codeload.github.com/dev-rke/devenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249085483,"owners_count":21210267,"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":"2024-10-02T10:53:21.935Z","updated_at":"2025-10-19T12:44:55.621Z","avatar_url":"https://github.com/dev-rke.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevEnv\n\nEver wondered why it is so complicated to set up a local development environment with multiple hosts?\n\n* A development environment, that uses TLS by default?\n* With local domain names for your services?\n* That supports docker?\n* Which allows you to work on multiple projects at once without switching VMs or Containers?\n* Which is working on Linux, MacOS and Windows?\n* And just needs some minor customizations of your existing setup?\n\n**You've come to the right place, this is DevEnv and it will simplify your and your developers life.**\n\nNo matter if you are a Frontend Developer, Java Developer, PHP Developer, Python, Ruby or NodeJS Developer. \nAll Developers share the same pain: their code works locally, but won't work on staging and production environments \nin some cases, because their development environment differs too hard from staging/production. \n\n\n## Quickstart\n\nTo get it running, clone the repo and run the installer for your operating system.\nWhen everything was set up successfully, you should be able to see all running stacks when\nyou open https://dev.env/ in your browser. Furthermore you are able to see the traefik dashboard \nvia https://traefik.dev.env/\n\nFirefox users on Windows please see the note below in the install section.\n\n\n## Installation\n\n#### Linux\n\nRequirements: git, docker, docker-compose, systemd\n```bash\ngit clone git@github.com:dev-rke/devenv.git\ncd devenv/\n./install-linux.sh\n```\n\n#### MacOS\n\nRequirements: git, docker, docker-compose, brew\n```bash\ngit clone git@github.com:dev-rke/devenv.git\ncd devenv/\n./install-macos.sh\n```\n\n#### Windows\n\nRequirements: git, docker, docker-compose\nRun in powershell with admin rights:\n```powershell\ngit clone git@github.com:dev-rke/devenv.git\ncd devenv/\n.\\install-windows.ps1\n```\n\n##### Important note for Firefox Users on Windows:\nFirefox will not trust your certificate by default, because it does not load certificates from the windows certificate store.\n\nTo solve this you have two options:\n\n**a) via [about:config](about:config)**\n* accept the warning\n* search for the key \"security.enterprise_roots.enabled\"\n* change its value to \"true\" using a double click\n\n**b) import the root certificate manually**\n* go to the [Preferences](about:preferences)\n* search for certificates section\n* import the Root Certificate manually from %localappdata%/mkcert/\n\n\n## Register your own Container\n\nTechnically you need a container providing a HTTP web server on port 80.\nPlease do not expose webserver ports (80, 443) to your host, as these are already used by DevEnv.\nThe container providing the webserver has to be within the ```devenv``` network and needs a ```devenv.subdomains```-Label.\n\nIn this example we use nginx, a simple and lightweight webserver.\nCreate a new folder \"nginx\" and create a ```docker-compose.yml``` with the following contents:\n```yaml\nversion: '2'\nservices:\n  web:\n    image: nginx:alpine\n    labels:\n      - \"devenv.subdomains=my-server\"\n    networks:\n      - devenv\n\nnetworks:\n  devenv:\n    external: true\n```\n\nAfter running ```docker-compose up -d``` your new container is available via HTTP only: http://my-server.dev.env\n\nTo get it running only via HTTPS, you have to add the following label:\n```yaml\n- \"traefik.http.routers.web-nginx-https.tls=true\"\n``` \n\nIf you need both HTTP and HTTPS, please use these labels:\n```yaml\n- \"traefik.http.routers.web-nginx-http.tls=false\"\n- \"traefik.http.routers.web-nginx-https.tls=true\"\n``` \nTo apply these settings, just do a ```docker-compose down -v``` to stop your container \nand ```docker-compose up -d``` to run it again.\nA good non-conflicting naming schema for a router is ```\u003ccontainer name\u003e-\u003cproject name\u003e-\u003cscheme\u003e```.\nAll subdomains defined via ```devenv.subdomains``` label apply to all rules. \n\nThese labels follow the standard docker configuration settings of the \nreverse proxy [traefik](https://containo.us/traefik/).\n\n#### Multiple subdomains for a single container\n\nIf your container needs multiple subdomains, there are two approaches.\nThe first and simple approach is to expand the ```devenv.subdomains``` label with comma separated subdomains:\n```yaml\n- \"devenv.subdomains=nginx,webserver,myproject\"\n```\nThis will make your container available under these domains:\n* http://nginx.dev.env\n* http://webserver.dev.env\n* http://myproject.dev.env\n\nWhitespaces before or after the comma will break the behaviour!\n\nThe second approach is based on regular traefik configuration, just register your domains as regular rules via label:\n```yaml\n - \"traefik.http.routers.nginx-http.rule=Host(`nginx.dev.env`, `webserver.dev.env`, `myproject.dev.env`)\"\n```\nor in a more complex scenario, which allows to define more settings per rule:\n```yaml\n - \"traefik.http.routers.nginx-http.rule=Host(`nginx.dev.env`)\"\n - \"traefik.http.routers.webserver-http.rule=Host(`webserver.dev.env`)\"\n - \"traefik.http.routers.myproject-http.rule=Host(`myproject.dev.env`)\"\n```\n\n## Deliver static files\n\nEspecially Frontend Developers need support by a local webserver with TLS, \ndue to the fact that there are typically things like CORS, \nor technical restrictions for some APIs when there is no TLS.\n\nTo set up your project, go to the path provided in the file ```devenv/.env```.\nWithin this path, just create the folder structure and a file ```test/web/index.html```\nand insert the content ```\u003ch1\u003eHello World\u003c/h1\u003e```. Afterwards open https://test.dev.env in your browser.\n\nAll folders will be resolved dynamically, so by creating another folder you can set up another subdomain. \nThis functionality is especially for some instant projects, prototyping, testing and so on, \nwithout the need of a heavy virtual machine or containers.\n\n\n## How does it work?\n\nThe project is a collage of multiple projects:\n* [traefik](https://containo.us/traefik/)\n* [nginx](https://www.nginx.com/)\n* [mkcert](https://github.com/FiloSottile/mkcert)\n* [dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html)\n\n#### Setup\nThe setup process downloads mkcert, generates and registers a CA and generates local certificates for *.dev.env. \nThen a local resolver is registered in your operating system to resolve any request via dnsmasq. \nAfterwards a global docker network will be set up to communicate between the containers. \nAt the end docker-compose is booting up DevEnv to serve.\n\n#### Request processing\nBefore a request gets processed, your browser, curl or whatever will resolve it's domain name.\nThis will be done using the local domain resolver of your operating system, which will itself lookup \nonly ```*.dev.env``` domains. All ```*.dev.env``` domains are enforced to be resolved via dnsmasq running \non your loop back device 127.0.0.1, which itself will resolve any subdomain of ```*.dev.env``` to the loop back\ndevice as well. Therefore a browser will do it's HTTP request to ```127.0.0.1:80``` and HTTPS to ```127.0.0.1:443```.\n\nThe processing of the final request travels through traefik. If there exists a route with a container (by defining the\n```devenv.subdomains``` label or using ```traefik.enable=true``` in combination with other standard traefik labels) \nit will use this route to finish the request.\nIf no route is specified, the request falls back to the static nginx service of DevEnv, \nwhich will deliver static files from your configured web folder, see .env file for the configured path. \nThe web folder on your host is different on all operating systems.\n\n## The *.dev.env domain\n\nSince google fucked up the ```*.dev``` top level domain (TLD), a lot of people switched to ```*.localhost```, \n```*.test``` or some crazy TLDs like ```*.invalid``` and ```*.example```. \nThese TLDs are listed by the [RFC 2606](https://tools.ietf.org/html/rfc2606#page-2) for local testing purposes. \n\nIn my opinion, these TLDs are useless. They are very long, which causes typing errors and are hard to remember.\nAlso the TLD ```*.localhost``` is typically assigned to the loop back IP address.\nFurthermore, developers and companies have sometimes services running on these testing TLDs, \nwhich might conflict when i provide another service locally.\nTherefore i chose ```*.dev.env```.\nCurrently (May 2020) ```*.env``` is not a registered top level domain and i assume this will be the case for the next years.\nThe chosen domain ```dev.env``` limits the amount of overridden domains to a minimum,\neven when the TLD gets officially registered you can still use the ```*.env``` TLD, except for ```dev.env```.\n\nFurthermore it is not possible to generate certificates for a whole TLD like ```*.env```, \nso i chose the approach using a concrete subdomain via ```*.dev.env```.\nFor People who would like to use sub-subdomains: you have to generate a new multi domain wildcard certificate yourself, \nit is not possible to use double wildcards like ```*.*.dev.env```.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-rke%2Fdevenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev-rke%2Fdevenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-rke%2Fdevenv/lists"}