Take a look at this:
https://www.digitalocean.com/community/tutorials/containerizing-a-ruby-on-rails-application-for-development-with-docker-compose

wt., 26 maj 2020 o 19:47 Ricardo Amaro <[email protected]> napisał(a):

> Hello to all,
>
> I would like to configure a Jenkinsfile for a RoR project with a
> PostgreSQL database, but the syntax and the documentation is driving me
> crazy.
>
> As I understand, if I want my RoR app to run in a Docker container and my
> Postgres Db to run in another container, I need to use something like this:
>
> node {
>   docker.image('postgres:11.3').withRun("--env POSTGRES_USER=user --env
> POSTGRES_PASSWORD=password -p 54321:5432") { c ->
>     docker.build('test-image', './ci').inside("--link ${c.id}")
>   }
> }
>
> but, if the pipeline syntax tells me that I need to declare an agent,
> like this:
>
> pipeline {
>   agent {
>     ...
>   }
>   stages {
>     ...
>   }
> }
>
> where do I need to declare the containers I'm creating?
>
> Am I doing this wrong? Is it impossible to have it this way, in two
> containers? Can someone, please, provide me with a full example of it?
>
>
> Thank you in advance!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/960edcc1-cd04-431a-8279-7d707062a3be%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/960edcc1-cd04-431a-8279-7d707062a3be%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
*Pozdrawiam / Kind regards,*
Piotr Bracha
*Vasco Electronics sp. z o.o. S.K.A.*
al. Pokoju 1, CTA/350
31-548 Kraków
NIP 677 236 91 51

E-mail:  [email protected]
[image: Vasco Electronics] <https://vasco-electronics.com/>
Vasco Electronics Spółka z ograniczoną odpowiedzialnością Spółka
Komandytowo-Akcyjna, Al. Pokoju 1, CTA/350, 31-548 Kraków, Polska, NIP:
6772369151, REGON: 122581850, zarejestrowana w Sądzie Rejonowym dla Krakowa
Śródmieścia XI Wydział KRS pod nr KRS: 0000421705, Kapitał zakładowy 50 000
zł (słownie: pięćdziesiąt tysięcy złotych) w całości wpłacony. Klauzula
Bezpieczeństwa: treść tej wiadomości wraz z załącznikami stanowią
informacje chronione przed ujawnieniem. Jeśli wiadomość ta nie jest
przeznaczona dla Ciebie uprzedzamy, że ujawnianie, kopiowanie,
rozpowszechnianie lub korzystanie z niej lub z załączników jest zabronione.
Jeśli otrzymałeś tę wiadomość przez pomyłkę, uprzejmie prosimy o
niezwłoczne zawiadomienie nadawcy i odesłanie jej z powrotem wraz z
załącznikami a także usunięcie ze swoich systemów.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAKfpvwd0nPxagz%2BwggR3GzYcTpaMd_LRzrBuzC8fqqsUuV%3DBtw%40mail.gmail.com.

Reply via email to