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

Add Dockerfile and Docker-Compose for Easy Setup #851

Open
anuragmerndev opened this issue Jun 9, 2024 · 6 comments
Open

Add Dockerfile and Docker-Compose for Easy Setup #851

anuragmerndev opened this issue Jun 9, 2024 · 6 comments

Comments

@anuragmerndev
Copy link
Contributor

As a recent contributor to this project, I encountered significant challenges setting up the development environment on my Windows system. The setup process required installing WSL/Ubuntu and downloading Java for testing, which was time-consuming and complex. To simplify the setup for future contributors and ensure a consistent development environment across different operating systems, I propose adding a Dockerfile and Docker-Compose configuration to the repository.

Problem

  • Time-consuming and complex setup, especially for non-Linux users.
  • Inconsistent environments can cause bugs and inefficiencies.

Solution:

  • Create a Dockerfile to containerize the application.
  • Add a Docker-Compose file with supertokens-core setup as well for easy testing.
  • Update the documentation with Docker setup instructions.
@anuragmerndev
Copy link
Contributor Author

@rishabhpoddar I would like to take this issue to add docker and docker-compose setup, Can I work on the same ?

@rishabhpoddar
Copy link
Contributor

Hey @anuragmerndev sure! Go for it. This is definitely a great idea. We had attempted a gitpod integration (see the readme here: https://github.com/supertokens/supertokens-root), but not sure if that still works.

@anuragmerndev
Copy link
Contributor Author

Sure thank you will check that

@anuragmerndev
Copy link
Contributor Author

@rishabhpoddar I am checking the gitpod for the containerization and development for the windows developers. Cause with the windows there's a thing that for windows docker is not correctly supporting bind mounts (hot reloading).
So I am trying to understand and find a workaround for the docker bind mounts for windows and also looking into gitpod.

@anuragmerndev
Copy link
Contributor Author

Hello @rishabhpoddar

To simplify the setup and testing process, especially for windows users, I am thinking about this approach:

Docker Support:

  • Dockerfile: Setup the dependencies, node and build the supertokens-node for testing.
  • docker-compose.yml: Set up dependencies, clone supertokens-root, install Java, run setup commands and then run the tests for supertokens-node.

Gitpod Configuration:

  • Add a .gitpod.yml file to configure the Gitpod environment.
  • This will allow developers to code and test directly in a pre-configured Linux environment.

Also for working on linux directly for supertokens-node on local machine. I did found one solution Vagrant they provide exactly what we need. It allows us to set up and run a virtual machine where developers can code directly from their IDE. The files will be synced with our host machine . However, developers will need to install and set up the virtual machine for this.

This approach ensures a consistent environment and simplifies setup with docker-compose up, Gitpod, or Vagrant.

Let me know if I can proceed.

@rishabhpoddar
Copy link
Contributor

@anuragmerndev the approach you mentioned makes sense! thanks

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

No branches or pull requests

2 participants