{"id":25637608,"url":"https://github.com/heydemoura/docker-bare-infra","last_synced_at":"2026-03-17T09:32:07.789Z","repository":{"id":73571882,"uuid":"109292509","full_name":"heydemoura/docker-bare-infra","owner":"heydemoura","description":"Docker based, minimal infrastructure boilerplate, with MySQL, WordPress, a React application and Nginx","archived":false,"fork":false,"pushed_at":"2017-11-05T20:21:51.000Z","size":1355,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-27T21:46:06.062Z","etag":null,"topics":["aws","docker","docker-compose","isomorphic","mysql","nginx","react","server-side-rendering","wordpress"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/heydemoura.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":"2017-11-02T16:40:55.000Z","updated_at":"2021-03-31T12:02:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7a9cfde-1444-49be-ac58-5f56c27250e5","html_url":"https://github.com/heydemoura/docker-bare-infra","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/heydemoura/docker-bare-infra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heydemoura%2Fdocker-bare-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heydemoura%2Fdocker-bare-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heydemoura%2Fdocker-bare-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heydemoura%2Fdocker-bare-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heydemoura","download_url":"https://codeload.github.com/heydemoura/docker-bare-infra/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heydemoura%2Fdocker-bare-infra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30620673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T08:10:05.930Z","status":"ssl_error","status_checked_at":"2026-03-17T08:10:04.972Z","response_time":56,"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":["aws","docker","docker-compose","isomorphic","mysql","nginx","react","server-side-rendering","wordpress"],"created_at":"2025-02-23T01:27:51.970Z","updated_at":"2026-03-17T09:32:07.781Z","avatar_url":"https://github.com/heydemoura.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker based minimal infrastructure\n\n### Main Goal\nOffer an easy way to migrate a wordpress website from a server to another, and also run a server side rendered ReactJS application.\n\nYou can use this project to easily set up or replicate a basic docker containers infrastructure, doing little adjusments to suit your needs.\n\n### How To\n\n#### Dependencies\n\n* docker \u003e= 1.13\n* docker-compose \u003e= 1.13\n\nInstructions on how to install:\n* [Docker installation instructions](https://docs.docker.com/engine/installation/)\n* [Compose installation instructions](https://docs.docker.com/compose/install/)\n\n### TL;DR\n\n```sh\ngit clone https://github.com/heydemoura/docker-bare-infra.git --depth=1 myserver \u0026\u0026 cd myserver\ndocker-compose up -d\n```\n\n### MySQL setup\n\nIf you are migrating a mysql dependant application, is better if you dump your databases and put the .sql scripts inside the `mysql/scripts/` directory. MySQL docker entrypoint will run any scripts inside this folder upon initialization of the mysql docker container.\n\nYou can also edit the `docker-compose.yaml` file if you need to set up any other environment variables or change any volumes.\n\n_If you are using Amazon Web Services, I suggest having a attached storaged only for your database volume. This way you can use the same database throughout your EC2 instances._\n\n### Nginx setup\n\nIf you have any custom Nginx configuration you need to setup, throw your configuration into the `nginx/conf.d/` or `nginx/default.d/` directories, *docker-compose* will mount theses folders as volumes of the Nginx container.\n\nAlso a nginx.conf file is located in `nginx/nginx.conf` that will be mounted as the container's `/etc/nginx/nginx.conf` file. So if you need any additional setup, edit this file.\n\n**Server Names**\n\nIn case you have a simple Nginx configuration, with only one server, you can change the **NGINX_HOST** environment variable on `docker-compose.yaml` to suite your need. There is a template that will be rewritten with your default _server_name_ for the default nginx configuration.\n\n```yaml\n...\n  nginx:\n    image: nginx:latest\n    ports:\n      - \"80:80\"\n    environment:\n      NGINX_HOST: 172.18.0.1\n    volumes:\n      - ./nginx/conf.d/:/etc/nginx/conf.d/\n      - ./nginx/default.d/:/etc/nginx/default.d/\n      - ./nginx/nginx.conf:/etc/nginx/nginx.conf\n    command: /bin/bash -c \"envsubst \u003c /etc/nginx/conf.d/conf.template \u003e /etc/nginx/conf.d/default.conf \u0026\u0026 nginx -g 'daemon off;'\"\n...\n```\n\n### Wordpress setup\n\nThis is a basic wordpress setup, if you want to migrate from another server, you will have to backup your files and setup a volume on `docker-compose.yaml` containing you wordpress installation.\n\nBy default, this project uses `/blog` route on Nginx for the Wordpress installation. You can edit the `nginx/default.d/blog.conf` file if you want to change that (also remember to change the port in this file if you change the wordpress container port on `docker-compose.yaml`)\n\n\nSetup your database name with the environment variables on `docker-compose.yaml` if you want to have a custom one, or if you are migrating from another server.\n\n**Wordpress Admin**\n\nBy default, Wordpress default configuration rewrites the URL when you try to access `wp-admin`. For a Wordpress standalone server this is pretty OK, but for this purpose of running it on a container under a reverse proxy, this can be a pain, when you try to access `/blog/wp-admin` it keeps sending you to the admin but the URL is rewritten to `/wp-admin`.\n\nUnfortunately I wasn't capable to setup wp-admin to preserve the URL when you access `/blog/wp-admin`. By default Nginx will redirect you to the container itself, accessing via the exposed port from wordpress container.\n\nI could use Wordpress MultiSite, but for that i should be using port 80 for Wordpress, that i am not. But even in that case I could do some hacking like on [this page](https://benohead.com/wordpress-running-multisite-different-port/), but this hack could be reverted by a future Wordpress update.\n\nFor the same cause, if you are performing a clean Wordpress installation, you should proceed with the installation script accessing the container itself.\n\n_Blog_\n\n* mydomain.com:8080\n\n_Home_\n\n* mydomain.com:8081\n\nAfter the installation process, update the **siteurl** for the containers to be: _mydomain.com/blog_ and _mydomain.com/hom_ respectively. Or esle it will not work correctly.\n\n**Permalinks**\n\nIn order to enable permalinks for posts, `htaccess` files for each wordpress container, they are located in `wordpress/`. For the sake of this example to work properly, copy both files to the respective containers:\n\n```sh\ndocker cp wordpress/blog_htaccess myserver_blog:/var/www/html/.htaccess\ndocker cp wordpress/home_htaccess myserver_home:/var/www/html/.htaccess\n```\n\nThis should enable proper permalinks rewrite rules for those containers.\n\n```yaml\n...\n  wordpress:\n    depends_on:\n      - db\n    image: wordpress\n    ports:\n      - \"8080:80\"\n    restart: always\n    environment:\n      WORDPRESS_DB_HOST: db:3306\n      WORDPRESS_DB_USER: wordpress\n      WORDPRESS_DB_PASSWORD: wordpress\n...\n```\n\n### Super Duper Server Side Rendered React App\n\nSmall and simple React app, server side rendered using Node and Express.\nMore details about this at the dedicated [README](https://github.com/heydemoura/docker-bare-infra/tree/master/app)\n\n### License\n\n[MIT](https://github.com/heydemoura/docker-bare-infra/blob/master/LICENSE) © Heyde Moura\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheydemoura%2Fdocker-bare-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheydemoura%2Fdocker-bare-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheydemoura%2Fdocker-bare-infra/lists"}