Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/solov1113/golang-react-psql-docker
Go, React, Docker, Postgresql
https://github.com/solov1113/golang-react-psql-docker
docker go golang pgsql react
Last synced: 4 days ago
JSON representation
Go, React, Docker, Postgresql
- Host: GitHub
- URL: https://github.com/solov1113/golang-react-psql-docker
- Owner: solov1113
- License: mit
- Created: 2023-04-07T19:25:39.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-04-07T19:30:21.000Z (over 1 year ago)
- Last Synced: 2024-10-11T09:41:27.766Z (about 1 month ago)
- Topics: docker, go, golang, pgsql, react
- Language: JavaScript
- Homepage:
- Size: 34.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang-React-psql-docker
Golang-React-psql-docker (Golang, Docker, React, Postgres) project starter.Disclaimer: This project is not actively supported and not recommended for production apps. Hope it serves as a learning resource.
## Features
* Start a this project with one command on any computer with docker-compose installed
* Dev mode features hot reloading on code changes for both the GoLang backend and React frontend (no need to rebuild containers while coding)
* Production mode features optimized static React frontend and binary goLang backend
* Production images built by passing a single arg option (images can then run on any computer with Docker)## Benefits
* Anyone can contribute to your project locally without having to setup/install GOPATH, Postgres, node etc
* Dev environment is the same as production environment
* Quickly get your GoDoRP project off the ground
* Forking the repo allows for customization of the template for your preferences## Getting started:
* download [docker-compose](https://docs.docker.com/compose/install/) if not already installed
Then run the following commands:```bash
$ mkdir myApp
$ cd myApp
$ git clone https://github.com/bomber0325/Golang-React-psql-docker.git .
$ docker-compose up
```
Then you can open the React frontend at localhost:3000 and the RESTful GoLang API at localhost:5000Changing any frontend (React) code locally will cause a hot-reload in the browser with updates and changing any backend (GoLang) code locally will also automatically update any changes.
Then to build production images run:
```bash
$ docker build ./api --build-arg app_env=production
$ docker build ./frontend --build-arg app_env=production
$ docker build ./db
```