feat: Allows sharing of network (#16937)
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.
This commit is contained in:
committed by
mrugesh mohapatra
parent
1d9eca3700
commit
ef37c3bee2
@@ -288,26 +288,30 @@ node seed
|
||||
npm run develop
|
||||
```
|
||||
|
||||
### Setup freeCodeCamp via Docker
|
||||
### Setup freeCodeCamp using Docker
|
||||
#### Isolated
|
||||
Use this if you just want to work on freeCodeCamp.
|
||||
|
||||
You need to have [docker](https://docs.docker.com/install/) and [docker-compose](https://docs.docker.com/compose/install/) installed before executing commands below.
|
||||
You will need to have [docker](https://docs.docker.com/install/) and [docker-compose](https://docs.docker.com/compose/install/) installed before executing the commands below.
|
||||
|
||||
Create docker-compose.yml from sample file
|
||||
Setup:
|
||||
```bash
|
||||
cp sample.docker-compose.yml docker-compose.yml
|
||||
docker-compose run --rm freecodecamp npm install
|
||||
docker-compose run --rm freecodecamp npm run only-once
|
||||
```
|
||||
|
||||
Setup and run project:
|
||||
Run:
|
||||
```bash
|
||||
# Setup project
|
||||
docker-compose run --rm node npm install
|
||||
docker-compose run --rm node npm run only-once
|
||||
```
|
||||
```bash
|
||||
# Run project
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
#### Shared
|
||||
Use this if you want to work on other services that will run alongside
|
||||
of freeCodeCamp, using the database directly. An example is the [open-api](https://github.com/freeCodeCamp/open-api) project.
|
||||
|
||||
```bash
|
||||
docker-compose -f docker-compose.yml -f docker-compose-shared.yml up
|
||||
```
|
||||
|
||||
### Make Changes
|
||||
|
||||
|
Reference in New Issue
Block a user