https://github.com/wisdomfusion/docker-compose-go-nginx-pg
Docker Compose for golang server with nginx proxy and PostgreSQL database.
https://github.com/wisdomfusion/docker-compose-go-nginx-pg
docker docker-compose go golang postgres postgresql
Last synced: 3 months ago
JSON representation
Docker Compose for golang server with nginx proxy and PostgreSQL database.
- Host: GitHub
- URL: https://github.com/wisdomfusion/docker-compose-go-nginx-pg
- Owner: wisdomfusion
- License: mit
- Created: 2021-03-25T10:12:22.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-31T01:46:17.000Z (over 5 years ago)
- Last Synced: 2025-09-10T19:52:00.628Z (10 months ago)
- Topics: docker, docker-compose, go, golang, postgres, postgresql
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-compose-go-nginx-pg
Docker Compose for Golang Server with nginx Proxy and PostgreSQL(pg) Database
## Before Usage
With this suite of docker orchestration files, I put a prefix before containers' name, `myapp` be default. In this way, all of the containers built with the compose file would come up this a `myapp-` in its title, for example, `myapp-api` and `myapp-db`, etc.
Copy `.env.example` to `.env`, and change environment keys in `.env` file:
- APP_NAME
## Start Up
With all of your services defined in your `docker-compose` file, you just need to issue a single command to start all of the containers, create the volumes, and set up and connect the networks:
```sh
docker-compose up -d
```
When you run docker-compose up for the first time, it will download all of the necessary Docker images, which might take a while. Once the images are downloaded and stored in your local machine, Compose will create your containers. The `-d` flag daemonizes the process, running your containers in the background.
Once the process is complete, use the following command to list all of the running containers:
```sh
docker ps
```