forked from onur-ozkan/feednext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
69 lines (63 loc) · 2.08 KB
/
docker-compose.dev.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
64
65
66
67
68
69
# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
# \\\\\\\\\\\\\\\\\\ DEVELOPMENT ENVIRONMENT \\\\\\\\\\\\\\\\\
# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
version: '3.5'
services:
# ------------------------------------------------------------
# Nginx
# ------------------------------------------------------------
nginx_dev:
image: nginx:mainline-alpine
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./.docker/nginx/dev:/etc/nginx/conf.d:z
- ./.docker/certbot/conf:/etc/letsencrypt:z
- ./.docker/certbot/www:/var/www/certbot:z
# ------------------------------------------------------------
# Node - Backend
# ------------------------------------------------------------
backend:
build:
context: ./.docker/build/node
args:
NODE_VERSION: ${BACKEND_NODE_VER}-alpine
hostname: backend
working_dir: /home/node/app
volumes:
- ./server:/home/node/app:z
command:
- sh
- -c
- npm ci && npm run start:${START_BACKEND_AS}
depends_on:
- redis_dev
- mongo_dev
# ------------------------------------------------------------
# Redis
# ------------------------------------------------------------
redis_dev:
image: redis:${REDIS_SERVER}-alpine
hostname: redis_dev
# Apply custom arguments to redis startup
command: redis-server ${REDIS_ARGS:- }
environment:
- REDIS_ARGS=${REDIS_ARGS:- }
ports:
- ${LOCAL_LISTEN_ADDR}${REDIS_CONTAINER_PORT}:6379
# ------------------------------------------------------------
# MongoDB
# ------------------------------------------------------------
mongo_dev:
image: mongo:${MONGO_SERVER}
hostname: mongo_dev
container_name: mongo_dev
ports:
# [local-machine:]local-port:docker-port
- ${LOCAL_LISTEN_ADDR}${MONGO_CONTAINER_PORT}:27017
volumes:
# Mount MongoDB Data directory
- ./.docker/data/mongo:/data/db:z