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

reform frontend out of Docker stuff + other Docker #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jtagcat
Copy link
Contributor

@jtagcat jtagcat commented Feb 13, 2022

  • other Docker things

to get all images on cli:
docker build -t t:latest-celery-fast . --target=celery-fast
docker build -t t:latest-celery-slow . --target=celery-slow
docker build -t t:latest . --target=api
docker build -t t:latest-gpu -f gpu.Dockerfile .
(compose: see docker-compose files)

Closes #122

GPU not tested, others tested.

+ other Docker things

to get all images on cli:
docker build -t t:latest-celery-fast . --target=celery-fast
docker build -t t:latest-celery-slow . --target=celery-slow
docker build -t t:latest . --target=api
docker build -t t:latest-gpu -f gpu.Dockerfile .
(compose: see docker-compose files)
@@ -3,10 +3,11 @@ services:
nginx:
build: ./nginx
api:
build: .
build:
target: api
Copy link
Owner

@JeffreyCA JeffreyCA Feb 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
target: api
context: .
target: api

Unable to run docker compose without the context field for api and other services

Copy link
Contributor Author

@jtagcat jtagcat Feb 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, I had the issue the other way around (when context had subargs, target was needed)
(tested the thing asw)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be that here.. it does not have subargs :)

@JeffreyCA
Copy link
Owner

Thanks for reorganizing!

I'd like to keep the existing behaviour with docker-compose.dev.yml where a frontend service is running npm run dev (webpack in watch mode) and has a shared volume that maps to the local host machine's frontend/src. It simplifies debugging/development by rebuilding the frontend automatically after modifying the source on the host machine. It doesn't seem to work anymore with these changes.

@jtagcat
Copy link
Contributor Author

jtagcat commented Feb 22, 2022

Would using a separate Dockerfile for debug (stop at step before adding frontend + frontend separate)/prod be fine?

@jtagcat
Copy link
Contributor Author

jtagcat commented Feb 22, 2022

anygay, I'll try to split up the commit if I can

edit: can do: include frontend in api, but it can be overwritten by mounting to the same location (making using frontend image optional)

@JeffreyCA
Copy link
Owner

Yeah that's fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reorganize Dockerfiles / images
2 participants