mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-08 03:04:00 -05:00
build(docker): Expose mailhog port.
build(Docker): Improve wording.
build(docker): Mailhog and network changes.
* Add mailhog container to shared network to enable connectivity
* Configure project name for docker compose in .env sample file,
without it the basename of the repo directory is used, which
makes it unreachable for other services
* Set mailhog host to mailhog (instead of localhost) if MAILHOG_HOST
env var is set
* Expose 1025 to enable local troubleshooting
build(docker): Update README to reflect compose changes.
38 lines
806 B
YAML
38 lines
806 B
YAML
# Docker Compose file for FreeCodeCamp
|
|
#
|
|
# Bootstrap with:
|
|
# docker-compose run --rm server npm install
|
|
# docker-compose run --rm server npm run only-once
|
|
#
|
|
# Run with:
|
|
# docker-compose up
|
|
#
|
|
version: "3"
|
|
services:
|
|
freecodecamp:
|
|
image: node:8.9.4
|
|
depends_on:
|
|
- db
|
|
- mailhog
|
|
environment:
|
|
- MAILHOG_HOST=mailhog
|
|
- MONGOHQ_URL=mongodb://db:27017/freecodecamp
|
|
volumes:
|
|
- .:/app
|
|
working_dir: /app
|
|
command:
|
|
- npm
|
|
- run
|
|
- develop
|
|
ports:
|
|
- "3000:3000"
|
|
db:
|
|
image: mongo:3.2.6
|
|
ports:
|
|
- "27017:27017"
|
|
mailhog:
|
|
image: mailhog/mailhog
|
|
ports:
|
|
- "1025:1025"
|
|
- "8025:8025"
|