-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
45 lines (41 loc) · 1019 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
42
43
44
45
version: '3.9'
services:
postgres:
image: postgres:14
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: gojwtauth
ports:
- "5432:5432"
volumes:
- ./initdb:/docker-entrypoint-initdb.d
postgres_test:
image: postgres:14
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: gojwtauth
volumes:
- ./initdb:/docker-entrypoint-initdb.d
server:
build: .
environment:
- SERVER_HOST=0.0.0.0
- SERVER_PORT=8888
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=gojwtauth
- POSTGRES_TEST_HOST=postgres_test
- POSTGRES_TEST_PORT=5432
- POSTGRES_TEST_USER=postgres
- POSTGRES_TEST_PASSWORD=password
- POSTGRES_TEST_DB=gojwtauth
- JWT_SECRET=b5a636fc-bd01-41b1-9780-7bbd906fa4c0
ports:
- "8888:8888"
volumes:
- .:/go/src/app
depends_on:
- postgres
- postgres_test