app:
build:
context: ./api/docker
dockerfile: golang.dockerFile
volumes:
- "./api:/go"
container_name: golang_app
ports:
- "9097:8080"
tty: true
depends_on:
- db
FROM golang:latest
RUN apt-get update
RUN go get "github.com/go-sql-driver/mysql"
RUN go get "github.com/gorilla/mux"
log.Fatal(http.ListenAndServe("127.0.0.1:9098", r))
ports:
- "9097:8080"
log.Fatal(http.ListenAndServe(":8080", r))