-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
41 lines (41 loc) · 1.03 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
version: "3.7"
services:
nodejs:
build:
context: .
dockerfile: ./.docker/Dockerfile
container_name: "${APP_NAME}_backend"
restart: unless-stopped
user: "node"
env_file: ./.env
environment:
APP_NAME: ${APP_NAME}
ENVIRONMENT: ${NODE_ENV}
stdin_open: true # docker run -i
tty: true # docker run -t
depends_on:
- postgres
ports:
- ${NODE_PORT}:${NODE_PORT}
volumes:
- ./code:/opt/nodeDEV/code
- ./.docker/entrypoint.sh:/opt/nodeDEV/code/entrypoint.sh:ro
command: "yarn ${NODE_ENV}"
postgres:
image: postgres:9.6.2-alpine
container_name: "${APP_NAME}_database"
env_file: ./.env
restart: unless-stopped
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${APP_DATABASE}
ports:
- ${DATABASE_PORT}:5432
adminer:
image: adminer
container_name: "${APP_NAME}_adminer"
env_file: ./.env
restart: unless-stopped
ports:
- ${ADMINER_PORT}:8080