Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: local dev fixes #173

Merged
merged 1 commit into from
Jun 13, 2024
Merged

chore: local dev fixes #173

merged 1 commit into from
Jun 13, 2024

Conversation

jmeridth
Copy link
Contributor

Pull Request

Proposed Changes

  • add .dockerignore so we don't copy node_modules from local to container via Dockerfile
    • we use a multi-stage build to install and use node_modules in the container
  • change Dockerfile from --production to --omit=dev
  • update docker-compose.yml
    • remove version key and value (it's deprecated)
    • change volume mounting so it doesn't obliterate node_modules and make packages unreachable
    • remove unecessary key/values

Test Dockefile still works locally

docker build -t icf
docker run --it --rm --env_file .env -p 3000:3000 --name icf icf:latest
# go to http://localhost:3000

Test with docker-compose locally

docker-compose up -d
# go to http://localhost:3000

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run npm run lint and fix any linting issues that have been introduced
  • run npm run test and run tests
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either bug, documentation, enhancement, infrastructure, maintenance, or breaking

- [x] add .dockerignore so we don't copy node_modules from local to container via Dockerfile
  - we use a multi-stage build to install and use node_modules in the container
- [x] change Dockerfile from `--production` to `--omit=dev`
- [x] update docker-compose.yml
  - [x] remove version key and value (it's deprecated)
  - [x] change volume mounting so it doesn't obliterate node_modules and make packages unreachable
  - [x] remove unecessary key/values

## Test Dockefile still works locally

```shell
docker build -t icf
docker run --it --rm --env_file .env -p 3000:3000 --name icf icf:latest
# go to http://localhost:3000
```

## Test with docker-compose locally

```shell
docker-compose up -d
# go to http://localhost:3000
```

Signed-off-by: jmeridth <[email protected]>
@jmeridth jmeridth self-assigned this Jun 12, 2024
@jmeridth jmeridth requested a review from a team as a code owner June 12, 2024 20:44
@jmeridth jmeridth merged commit 9dda625 into main Jun 13, 2024
12 checks passed
@jmeridth jmeridth deleted the jm_local_dev_working_and_stuff branch June 13, 2024 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants