-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.yml
47 lines (47 loc) · 1.27 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
version: '3'
services:
postgres:
image: postgres:latest
ports:
- '${TYPEORM_PORT}:${TYPEORM_PORT}'
environment:
POSTGRES_PASSWORD: postgres
volumes:
- ./docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
redis:
image: redis:latest
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- '${REDIS_PORT}:${REDIS_PORT}'
node-api-base:
build:
context: ./
dockerfile: Dockerfile.dev
environment:
PORT: "${PORT}"
JWT_SECRET: "${JWT_SECRET}"
TYPEORM_TYPE: postgres
TYPEORM_HOST: postgres
TYPEORM_USERNAME: postgres
TYPEORM_PASSWORD: postgres
TYPEORM_DATABASE: "${TYPEORM_DATABASE}"
TYPEORM_PORT: "${TYPEORM_PORT}"
TYPEORM_SYNCHRONIZE: "true"
TYPEORM_LOGGING: "true"
TYPEORM_MIGRATIONS_RUN: "${TYPEORM_MIGRATIONS_RUN}"
ACCESS_TOKEN_LIFE: "${ACCESS_TOKEN_LIFE}"
RATE_LIMIT_WINDOW: "${RATE_LIMIT_WINDOW}"
RATE_LIMIT_MAX_REQUESTS: "${RATE_LIMIT_MAX_REQUESTS}"
ports:
- '${PORT}:${PORT}'
restart: on-failure
container_name: node-ts-api-base
depends_on:
- postgres
- redis
links:
- postgres
- redis
volumes:
- "./src:/app/src"
- /src/node_modules