-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
54 lines (51 loc) · 1.29 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
version: '3'
services:
go:
build: .
ports:
- "80:8080"
links:
- postgres
environment:
DEBUG: 'true'
PORT: 8080
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_USER: goddd
DATABASE_PASSWORD: goddd
DATABASE_DB: goddd
postgres:
image: onjin/alpine-postgres:9.5
restart: unless-stopped
ports:
- "5432:5432"
environment:
LC_ALL: C.UTF-8
POSTGRES_USER: goddd
POSTGRES_PASSWORD: goddd
POSTGRES_DB: goddd
# Database migration service
flyway:
image: flyway/flyway
command: -url=jdbc:postgresql://postgres:5432/goddd -schemas=goddd -user=goddd -password=goddd -connectRetries=60 migrate
volumes:
- ./migrations/:/flyway/sql
links:
- postgres
depends_on:
- postgres
# For testing
test:
build:
context: .
dockerfile: DockerfileTest
links:
- postgres
environment:
DEBUG: 'true'
PORT: 8080
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_USER: goddd
DATABASE_PASSWORD: goddd
DATABASE_DB: goddd