mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
Improved Dockerfile and docker-compose for dev
This commit is contained in:
parent
4506493353
commit
06b3fdd17c
@ -1,9 +1,12 @@
|
||||
# Build Stage
|
||||
|
||||
FROM golang:1.13 AS build-env
|
||||
ADD . /src
|
||||
RUN cd /src && go build -o wakapi
|
||||
WORKDIR /src
|
||||
ADD ./go.mod .
|
||||
RUN go mod download
|
||||
|
||||
ADD . .
|
||||
RUN go build -o wakapi
|
||||
|
||||
# Final Stage
|
||||
|
||||
|
25
docker-compose.yml
Normal file
25
docker-compose.yml
Normal file
@ -0,0 +1,25 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
wakapi:
|
||||
build: .
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: always
|
||||
environment:
|
||||
WAKAPI_DB_TYPE: "postgres"
|
||||
WAKAPI_DB_NAME: "wakapi"
|
||||
WAKAPI_DB_USER: "wakapi"
|
||||
WAKAPI_DB_PASSWORD: "asdfasdfasdf"
|
||||
WAKAPI_DB_HOST: "db"
|
||||
WAKAPI_DB_PORT: "5432"
|
||||
ENV: "dev"
|
||||
|
||||
db:
|
||||
image: postgres:12.3
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
POSTGRES_USER: "wakapi"
|
||||
POSTGRES_PASSWORD: "asdfasdfasdf"
|
||||
POSTGRES_DB: "wakapi"
|
Loading…
Reference in New Issue
Block a user