-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
122 lines (113 loc) · 2.49 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
version: "3.7"
services:
buffalo:
build:
context: ./application
dockerfile: Dockerfile-dev
volumes:
- ./application:/cover
- go-build:/root/.cache/go-build
ports:
- "3000:3000"
- "6060"
env_file:
- ./test.env
- ./local.env
environment:
ADDR: 0.0.0.0
PORT: 3000
DATABASE_URL: postgres://cover:cover@db:5432/cover?sslmode=disable
DISABLE_TLS: "true"
GO_ENV: development
depends_on:
- db
- minio
command: buffalo dev
debug:
build:
context: ./application
dockerfile: Dockerfile-dev
volumes:
- ./application:/cover
- go-build:/root/.cache/go-build
ports:
- "3000:3000"
- "2345:2345"
- "6060"
env_file:
- ./test.env
- ./local.env
environment:
ADDR: 0.0.0.0
PORT: 3000
DATABASE_URL: postgres://cover:cover@db:5432/cover?sslmode=disable
DISABLE_TLS: "true"
GO_ENV: development
depends_on:
- db
- minio
command: ./debug.sh
test:
build:
context: ./application
dockerfile: Dockerfile-dev
volumes:
- ./application:/cover
- go-build:/root/.cache/go-build
env_file:
- ./test.env
environment:
GO_ENV: test
DOCKER_IP: testdb
HISTCONTROL: ignoreboth:erasedups
LOG_LEVEL: fatal
API_BASE_URL: localhost
depends_on:
- testdb
- minio
working_dir: /cover
command: buffalo test
db:
image: postgres:11.6
volumes:
- ./db-init.sh:/docker-entrypoint-initdb.d/db-init.sh
environment:
POSTGRES_USER: cover
POSTGRES_PASSWORD: cover
POSTGRES_DB: cover
testdb:
image: postgres:11.6
volumes:
- ./db-init.sh:/docker-entrypoint-initdb.d/db-init.sh
ports:
# expose the database port so testing can run locally, e.g. in Goland
- "5432:5432"
environment:
POSTGRES_USER: cover
POSTGRES_PASSWORD: cover
POSTGRES_DB: cover_test
# http://localhost:8080/?pgsql=db&username=cover&db=cover&ns=public
adminer:
image: adminer
depends_on:
- db
ports:
- 8080:8080
minio:
image: minio/minio
ports:
- "9001:9001"
command: server /data --console-address ":9001"
env_file:
- ./test.env
swagger:
build:
context: ./application
dockerfile: Dockerfile-api-docs
ports:
- "8082:8082"
volumes:
- ./application/:/app
working_dir: /app
volumes:
go-build: {}