Skip to content

elvinlari/docker-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang CRUD Application Scaffold

Usage

API

docker-compose

If you want to setup docker environemnt just use ./scripts/docker-compose.yml with docker-compose.

Go to ./scripts directory and execute

# start docker environment
$ docker-compose up -d (--build)

# list running services
$ docker-compose ps

# stop all containers
$ docker-compose stop

# remove all containers
$ docker-compose rm

single docker

  • Build app: &docker build -t golang:go-app . && $docker run --name go-crud --network=host -it -d -p 8080:8080 golang:go-app
  • You can run localDB with: $docker run -d -p 3306:3306 --name mysql-db -e MYSQL_ROOT_PASSWORD=admin -d mysql:5.7

Run Locally:

  • start mysql on 3306 port (and execute db script - manually currently)
  • start app from IDE or after install with flag -env=dev and giving -configFilePath, ./go-structure -env=dev

About

Docker and Go app boilerplate.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published