-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
63 lines (60 loc) · 1.46 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
version: "3"
services:
api:
container_name: garage_api
build:
context: .
dockerfile: api.Dockerfile
depends_on:
- db
ports:
- ${API_PORT}:${API_PORT}
volumes:
- ./api/src:/app/src
- ./config:/app/src/config
- ./models:/app/src/models
- ./migrations:/app/migrations
- ./seeders:/app/seeders
command: ["yarn", "start"]
environment:
SERVER_NAME: ${SERVER_NAME}
API_PORT: ${API_PORT}
NODE_ENV: ${APP_ENV}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_DATABASE: ${POSTGRES_DB}
db:
container_name: garage_db
restart: on-failure
image: postgres:10-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- ${DB_PORT}:5432
volumes:
- ./data/postgres-${APP_ENV}:/var/lib/postgresql/data
pgweb:
container_name: garage_pgweb
restart: on-failure
image: sosedoff/pgweb
depends_on:
- db
environment:
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:${DB_PORT}/${POSTGRES_DB}?sslmode=disable
ports:
- 8081:8081
logging:
driver: none
mailhog:
container_name: garage_mailhog
restart: on-failure
image: mailhog/mailhog
ports:
- 1025:1025
- 8025:8025
logging:
driver: none