-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
22 lines (21 loc) · 1.14 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
version: '2'
services:
react_server: # The label of the service
build: . # The location of the Dockerfile to build
volumes: # Files to share with the container and the host
- .:/www # Share the project in /www in the container
- react_server_node_modules:/www/node_modules # A special volume so that OS specific node_modules are built correctly
working_dir: /www # The location all commands should run from
environment:
NODE_ENV: 'docker' # Set the NODE_ENV environment variable
command: /bin/bash -c "npm install && npm start" # The command to run in when the container starts
ports: # Ports to expose to your host
- '3000:3000'
- '3001:3001'
# An example database
# my_db:
# image: rethinkdb:latest
# You can reference the db/service by using the dns name `my_db` and docker will do the rest
# Volume to store separate from the container runtime and host
volumes:
react_server_node_modules: