-
Notifications
You must be signed in to change notification settings - Fork 77
Fix: Docker Setup #980
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
Fix: Docker Setup #980
Conversation
76ba8f4
to
aa6872f
Compare
aa6872f
to
978487f
Compare
worker: bundle exec sidekiq -C config/sidekiq.yml | ||
vite: bin/vite dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's this issue related to the translations stuff. We can investigate later. In production this problem doesn't exist. Just in development.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The production Procfile does not start a new process for Vite. So, I believe that by removing this process that issue has been fixed.
worker: bundle exec sidekiq -C config/sidekiq.yml | ||
vite: bin/vite dev | ||
pusherfake: pusher-fake -i ${PUSHER_APP_ID:-123456} --socket-host 0.0.0.0 --socket-port ${PUSHER_WS_PORT:-45449} --web-host 0.0.0.0 --web-port ${PUSHER_PORT:-8888} -k ${PUSHER_APP_KEY:-centralakey} -s ${PUSHER_APP_SECRET:-centralsecret} | ||
pusherfake: PUSHER_FAKE=1 pusher-fake -i ${PUSHER_APP_ID:-123456} --socket-host 0.0.0.0 --socket-port ${PUSHER_WS_PORT:-45449} --web-host 0.0.0.0 --web-port ${PUSHER_PORT:-8888} -k ${PUSHER_APP_KEY:-centralakey} -s ${PUSHER_APP_SECRET:-centralsecret} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an annoying issue with this process that looks to be a bug in Foreman. Foreman sends a SIGTERM to all child processes and then they are terminated. However, for pusher-fake specifically, the resources are not fully released by the process and it keeps the port 8888 busy. I couldn't figure out how to solve this, if you have any suggestion I'd appreciate it. For now, you can manually kill the process after exiting Foreman.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created this issue to investigate later.
nginx-proxy: | ||
image: jwilder/nginx-proxy | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- /var/run/docker.sock:/tmp/docker.sock:ro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the application is no longer running on a Docker container, we can no longer bind the Nginx proxy to the application web server, so removing this service.
adminer: | ||
image: adminer:4.8.1 | ||
environment: | ||
- VIRTUAL_HOST=adminer.cm42-central.localhost | ||
ports: | ||
- 8080:8080 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can leave this for now. Just admin front-end to handle database stuff. We might remove this in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It always makes me happy to see your PR's @danielmbrasil 😄
I used the changes from this pr to help @julialbq with her setup 👍
Overall, LGTM
If you want to, we can join forces to investigate this pusher-fake later on 🤙
We noticed there were e2e tests that haven't worked. Opened this issue |
Besides, opened this issue to enhance Cypress E2E cover |
What this PR do ?
Updates the Docker setup. The application no longer is run inside a Docker container. Now, it's possible to run the application infrastructure (Redis, Postgres, Memcached) in containers, while running the application itself on your machine.
Related Issues
Fixes #930.
Closes #873 (deprecated)
Screenshots (if applicable)
Additional Notes (if any)