Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active December 5, 2016 16:42
Show Gist options
  • Save AdamBien/cd3e5478bda09f01de2d85e9e2a07dcb to your computer and use it in GitHub Desktop.
Save AdamBien/cd3e5478bda09f01de2d85e9e2a07dcb to your computer and use it in GitHub Desktop.
33rdAirhacksQ&A.md
@walnikster
Copy link

Hi Adam,
thank you for your great work. Your containers in docklands are very useful.
Can you give an example how to configure a JDBC datasource in the payara-configured docker container, please. E.g. a postgresql DB? How to add the library for the db driver to the container image?
Is it better to run the database in a docker container or on the host?
Do you recommend a shared database instance for several applications or a single database instance for each app?
Thank you, and keep up the great work.
Kind regards,
Niki

@tonda100
Copy link

tonda100 commented Nov 28, 2016

Hi Adam,

  1. Where do you save your docker images, which cannot be public?
  2. I am trying to follow the DRY principle and I use single object for saving into database and the save object return via REST endpoint, but some fileds I do not want send via REST (password or LocalDateTime which can be converted for JPA but does not look nice in JSON). I can create JsonObject but there can be a lot of work to re-map everything. I can create DTO but it is more or less the same (manual remapping). I can use @JsonIgnore annotation but that would restrict for using just with application server using Jackson.
  3. What mechanism do you use for queues? First choice JMS, but I would like support scaling so remote JMS server, but that involves configuration of application server JCA or remote JMS and JMS server have to run before start of application server. Second choice RabbitMQ but it is not JMS and external library necessary, using via docker seems like it does not support persistence of messages like activemq.

Thanks Antonin

@sentyaev
Copy link

sentyaev commented Nov 30, 2016

Adam, thanks for answering my question in last video. I have another one.
It's about Docker and deployment.

  1. For now in my CI when I push changes to let's say 'master' branch it build, test, create docker image and upload this new image into container registry and each time I have new version of container. That's works great.
    In my production environment I have reversproxy and behind this I have two instances of application 'prod' and 'staging'.
  2. I go to production server, shutdown 'staging', and run new 'staging'.
  3. I run tests against staging and if it's fine I switch 'prod' and 'staging' in reversproxy config. Also it works fine.

My issue is this #2 and #3 steps I do manually. I have a scripts, so I 'ssh' to server and run this scripts.
Is there a simple/proper way of doing this? Probably some tools you can point to?

@heppa
Copy link

heppa commented Dec 1, 2016

Hi Adam, again many thanks for your valuable input to the community... I would like to know, what you think about Project lombok (https://projectlombok.org/) as I know, you are not a fan of bloat. For me, it turns out to be very useful (especially for the Builder pattern) once you master the idea of several potentially dependant annotation processors. Would you use lombok or prefer having the whole code needed for e.g. Builder written out manually or generated by IDE plugins?

@yacota
Copy link

yacota commented Dec 5, 2016

We are currently evaluating different container technologies ... at the begining Docker seemed to be the most appropiate choice but now(after learning a bit) Rkt seems to be better choice for us.
Could you please briefly describe why you've choosen Docker instead of Rkt(others?).

Thanks

@AdamBien
Copy link
Author

AdamBien commented Dec 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment