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 devcontainer support #13

Merged
merged 7 commits into from Jul 17, 2021
Merged

Add devcontainer support #13

merged 7 commits into from Jul 17, 2021

Conversation

agucova
Copy link
Member

@agucova agucova commented Jul 16, 2021

Resolviendo #12, al menos por el lado del desarrollador, esto agrega un entorno replicable que utiliza development containers de Visual Studio Code para crear un entorno de desarollo replicable de Docker en segundos.

Esto gestiona las dependencias, base de datos, pre-commit y migraciones. Lo único que hay que hacer manualmente es agregar las credenciales OAuth.

Como bonus, añadí un .gitattributes para prevenir errores de line endings por la diferencia de entornos (y aproveché de añadirle reglas específicas para Python), y agregué un script de launch para VSCode.

@agucova agucova self-assigned this Jul 16, 2021
@agucova agucova added the feature New feature or request label Jul 16, 2021
@agucova agucova linked an issue Jul 16, 2021 that may be closed by this pull request
@agucova agucova requested review from nico-mac and FarDust July 16, 2021 04:18
@agucova agucova marked this pull request as ready for review July 16, 2021 04:19
@nico-mac
Copy link
Member

nico-mac commented Jul 16, 2021

¿Es necesario tener VSCode para poder usar este contenedor, cierto? No me gusta la idea de "casarnos" con un IDE, en lo personal yo uso VSCode solo como un editor de texto inteligente y no me gustaría tener alta dependencia con este ni con ningún otro IDE.

Sabiendo que si puede ser útil, podríamos dejar esto en una branch develop hasta armar un Docker container independiente y con lo necesario para llevarlo a producción.
¿Que opinan?

@agucova
Copy link
Member Author

agucova commented Jul 16, 2021

@nico-mac Estoy de acuerdo, y de todas formas vamos a necesitar el contenedor general, pero la ventaja de un devcontainer es que se integra directamente con las herramientas de debug y sistema de archivos de VSCode. Entiendo que ningún otro IDE ofrece esta funcionalidad.

Creo que no son cosas mutuamente excluyentes, y se puede armar el devcontainer a partir de la imagen más general (si no me equivoco), sin embargo esto es simplemente una facilidad temporal para impulsar el desarrollo.

@agucova
Copy link
Member Author

agucova commented Jul 16, 2021

Efectivamente:

Can I just reuse an existing container image or Docker / Docker Compose configuration?

Yes! If you have a Dockerfile or Docker Compose file in your project/repository, follow the same steps to add a definition and you'll be prompted to select a Dockerfile or Docker Compose file and customize from there. If you then commit these files to a Git repository, you can use it with GitHub Codespaces as well. If you prefer, you can also start up the container manually and attach to it. However, note that many images will be missing things like git that you will want to use. There are scripts in the script-library like the common script that can help adding these to your existing Dockerfile or image.

.env.example Show resolved Hide resolved
@agucova
Copy link
Member Author

agucova commented Jul 17, 2021

@nico-mac estarías de acuerdo con mergear y hacer un follow-up para agregar una imagen mas general?

@nico-mac
Copy link
Member

Hagamos el merge, pero queda pendiente hacer el contenedor general y depués "descasarnos" de VSCode.

docs/SETUP.md Outdated Show resolved Hide resolved
@agucova agucova merged commit 1fad867 into main Jul 17, 2021
@agucova agucova deleted the devcontainer-support branch July 17, 2021 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants