-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (57 loc) · 1.2 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
version: '3.8'
services:
nginx:
container_name: lgtm-cat-api-nginx
build:
context: .
dockerfile: docker/nginx/Dockerfile
ports:
- 3331:3331
environment:
- BACKEND_HOST=dev
- PORT=3331
depends_on:
- dev
networks:
- lgtm-cat
dev:
container_name: lgtm-cat-api-dev
build:
context: .
dockerfile: Dockerfile
target: dev
volumes:
- ./:/go/app
command: air -c ${AIR_CONF}
ports:
- 3333:3333
- 2345:2345
environment:
DB_HOSTNAME: ${DB_HOSTNAME}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
SENTRY_DSN: ${SENTRY_DSN}
ENV: local
REGION: ap-northeast-1
COGNITO_USER_POOL_ID: ${COGNITO_USER_POOL_ID}
networks:
- lgtm-cat
test:
build:
context: .
dockerfile: Dockerfile
target: unit-test
volumes:
- ./:/go/app
command: go test -shuffle=on -v ./...
environment:
TEST_DB_HOST: ${TEST_DB_HOST}
TEST_DB_USER: ${TEST_DB_USER}
TEST_DB_PASSWORD: ${TEST_DB_PASSWORD}
TEST_DB_NAME: ${TEST_DB_NAME}
networks:
- lgtm-cat
networks:
lgtm-cat:
external: true