Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
45 lines (41 sloc)
1.04 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |