Skip to content
Permalink
todo-envs
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
45 lines (41 sloc) 1.04 KB
version: '3.7'
# Use the network set up in the shared compose file.
networks:
default:
external: true
name: todo_${ENV}_default
services:
backend:
build:
context: .
target: development-backend
command: npx nodemon server.js
environment:
DATABASE_URL: postgres://postgres:postgres@postgres/${ENV}
PORT: 8080
external_links:
- todo_postgres_1:postgres
volumes:
- ./backend:/srv/todo/backend
- backend_node_modules:/srv/todo/backend/node_modules
frontend:
build:
context: .
target: development-frontend
command: npx webpack-dev-server
depends_on:
- backend
environment:
HOST: frontend
PORT: 8080
volumes:
- ./frontend:/srv/todo/frontend
- frontend_node_modules:/srv/todo/frontend/node_modules
# Use the node_modules volumes set up in the shared compose file.
volumes:
backend_node_modules:
name: todo_backend_node_modules
external: true
frontend_node_modules:
name: todo_frontend_node_modules
external: true