lnug / speakers

Open an issue to submit a talk
https://github.com/lnug/speakers
43 stars 7 forks source link

Dockerizing JavaScript Applications #143

Closed d4nyll closed 5 years ago

d4nyll commented 6 years ago

Docker is an ecosystem that allows you to work with containers. Whilst the initial learning curve can be steep, it can ultimately make your development and deployment cycles much faster.

In this talk, I will show you how to deploy a simple front- and back-end application using Docker, and show how much faster it is than the traditional, more manual approach.

Resources

About Me

I am a JavaScript developer at Nexmo. Before that, I ran my own digital agency, Brew, in Hong Kong, specializing in Meteor.

admataz commented 6 years ago

Hi @d4nyll - I'd love to hear this talk - and hear about a practical approach to Dockerizing node apps... I think the practicalities for developers without ops knowledge can feel like a bit of a mystery.

How are you for August 22nd or October 24th?

@lnug/contributors @lnug/organisers - any seconders or more feedback?

sielay commented 6 years ago

Look forward to it @d4nyll . Especially please could you dig into the problem of setup working in dev with remote debugging for node and auto reload. Also interesting topic is the problem of discovering file changes between OSX file system and i.e. Ubuntu inside the container (I had to use polling here).

thanpolas commented 6 years ago

originally I thought of this as a pretty trivial topic but then I saw the slides and changed my mind, there are some pretty good points in there. I see there are mentions as to which images to use (alpine), this is a critical decision that has to be made and until you get bitten you are not aware of the consequences of the choices you make, so putting attention in the talk of image options and tradeoffs it'll be a 💣

d4nyll commented 6 years ago

@sielay Thanks for your suggestion. Just so that we are on the same page, you're asking about how to develop a Node.js application on Docker. This includes watching for changes in the file (like nodemon) and then run the build and run steps inside the Docker container. This part I understand, but can you elaborate a bit more on the "polling" part?

d4nyll commented 6 years ago

@thanpolas I was originally not going to cover optimization of Docker images, as the previous runs of my talk has taken 23 - 25 minutes. But now I think I should spend 50% showing how to Dockerize a simple application, and then 50% on simple ways to optimize the image that will apply to all applications.

d4nyll commented 6 years ago

@admataz Both August 22nd and October 24th would work great for me!

sielay commented 6 years ago

@d4nyll exactly with the difference, I used gulp and forever. Gulp watch was running inside a container and observed changes of code on the host machine.

Because file systems inside the container (which was Ubuntu) and host (which was OSX) weren't compatible events about file changes weren't passed. The only way to detect changes was to use polling option in gulp watch. I wonder if you encountered similar problems?

d4nyll commented 5 years ago

@sielay Sorry for the late reply. This made me think.

The way I've always done it is to use nodemon or a similar tool to detect local changes and run my tests / reload page locally. I'd only use a Docker container when I am 90% sure what I've done would work, then I'd run docker build again.

For me, Docker provides consistency through portability when sharing my work / code with others, but I don't really need to always keep checking this every time I made small changes to my code.

But, as I said, this made me think, and would love to chat with you more in the next Meetup!

d4nyll commented 5 years ago

@admataz I think, given @sielay's and @thanpolas's comments, I will do the original talk but add a part on optimizing Docker images for Node. Is that alright?

admataz commented 5 years ago

hi @d4nyll - that sounds like a good angle. I'm not sure about August's meetup (I'll be away) - I've put you in for October - if someone else from @lnug/organisers has the capability to run August, they may be in touch about moving...

seabaylea commented 5 years ago

@d4nyll @sielay as part of the docker templates in the CloudNativeJS.io project we provide support for running nodemon in the Docker container with your local project mapped into the container (so you're effectively developing in the container directly).

Take a look and see what you think:

admataz commented 5 years ago

Sounds good @seabaylea and @d4nyll - if we could coordinate a little and make it related - I think people would enjoy that. 👍

For the now we are scheduled for October - I will confirm

d4nyll commented 5 years ago

Thanks @seabaylea! I am on holiday right now (in the lovely France!), I will check it out when I get back!

admataz commented 5 years ago

Hi @d4nyll ! Just getting everything finalised for tomorrow's meetup... I trust all is still good from your side?

Some details:

We are hosted at Condé Nast Adelphi Building 1-11 John Adam Stree WC2N 6HT

We aim to start talks at 7pm - it would be great if you can get there some time between 6:30pm and 7pm?

If you need to contact me at any point - my number is 07757234443

See you tomorrow!

admataz commented 5 years ago

I meant to add - when you get to the venue - your name will be with security - ask for Michelle Garret if there are any issues.

d4nyll commented 5 years ago

@admataz Awesome. I will try to get there early to make sure the cables work :stuck_out_tongue: I just pinged you on Whatsapp as well so you have my number.

See you tomorrow!

admataz commented 5 years ago

Hey Daniel Great talk last week - and nice to chat later at the pub. Thanks for coming along and sharing your knowledge - I had really good feedback on your talk - and I agree it was full of great practical advice...

Please will you share any relevant links to your talk here - and particularly a link to your book - I'll post more about it on twitter.

If you have any thoughts/ feedback on LNUG in general, or the event and the way it was organised - please feel free to share...

I'll update this with a link to the video when it's ready.

Hopefully see you at the next meetup!

d4nyll commented 5 years ago

Hey @admataz,

Thanks for the opportunity! I enjoyed it a lot!

Most of the links are provided at the top comment, but I will summarize them all here:

mmm...feedback! I love the venue, beers / pizza was great!

I am flying to Hong Kong on Friday, coming back on the 26th November. If I am not too jet-lagged, I'd love to come to the next one!

d4nyll commented 5 years ago

Note that the video is now available at https://www.youtube.com/watch?v=96KtwRdszuE

admataz commented 5 years ago

Thanks again for the great talk - it's now also available on our YouTube channel: https://www.youtube.com/playlist?list=PLam_80-FY3vQE2I_NP0F3dTFsVHGrTTVX

See you soon!