Created
May 27, 2024 11:56
-
-
Save chrisvasqm/61df817c29ba515351415e6c572d0e0c to your computer and use it in GitHub Desktop.
Demostration docker-compose.yml file for a project with a Frontend + Backend+ Database setup to make local development easier
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
services: | |
db: | |
image: mongo:4.0-xenial | |
ports: | |
- 27017:27017 | |
volumes: | |
- vidly:/data/db | |
api: | |
build: ./backend | |
ports: | |
- 3001:3001 | |
environment: | |
DB_URL: mongodb://db/vidly | |
command: ./wait-for db:27017 && npm run db:up && npm start | |
web: | |
build: ./frontend | |
ports: | |
- 3000:3000 | |
depends_on: | |
- api | |
volumes: | |
vidly: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment