-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (37 loc) · 936 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
version: "3.4"
services:
app:
build:
context: .
target: dev
command: /go/bin/example
depends_on:
- db
- redis
environment:
- APP_PORT
- AUTORELOAD=${AUTORELOAD:-true}
- DB_URL=postgres://${POSTGRES_USER:-example}:${POSTGRES_PASSWORD:-example}@db/${POSTGRES_DB:-example}?sslmode=disable
- REDIS_URL=redis://redis
ports:
- "${APP_PORT:-8080}:8080"
volumes:
- ".:/go/src/github.com/agschwender/go-local"
db:
image: postgres
environment:
- POSTGRES_USER=${POSTGRES_USER:-example}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-example}
- POSTGRES_DB=${POSTGRES_DB:-example}
volumes:
- pg-data:/var/lib/postgresql/data
lint:
image: golangci/golangci-lint:v1.37.0-alpine
command: golangci-lint run
volumes:
- ".:/app"
working_dir: /app
redis:
image: redis:6.2-alpine
volumes:
pg-data: {}