Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (54 sloc) 1.22 KB
version: '3'
services:
# Nginx Server
ingress:
build:
context: ../.
dockerfile: docker/ingress/Dockerfile
image: ngnix-server
ports:
- '80:80' # Connect localhost 80 port to container 80 port
links: # Link services to access http://app and http://api inside the container
- api:api
- app:app
depends_on:
- "api"
- "app"
# Frontend App
app:
build:
context: ../.
dockerfile: docker/frontend-app/Dockerfile
image: app
env_file:
- ./../env/frontend-app/.env
volumes: # For webpack dev server to use our local files
- ./../env/frontend-app:/home/envuser/apphome
- /home/envuser/apphome/node_modules
ports:
- '10001:10001' # For docker to now where to redirect HMR queries
# API App
api:
build:
context: ../.
dockerfile: docker/api/Dockerfile
image: api
env_file:
- ./../env/api/.env
links:
- db:db
volumes:
- ./../env/api:/home/envuser/apphome
- /home/envuser/apphome/node_modules
ports:
- '10000:10000'
depends_on:
- "db"
db:
image: mongo
ports:
- "27017:27017"
volumes:
- data-volume:/data/db
volumes:
data-volume: