intercity / intercity-next

Web control panel to deploy apps on your servers (with Dokku)
https://intercity.io/
MIT License
116 stars 23 forks source link

WIP: Docker / Docker-compose for deploying intercity-next #242

Closed ariejan closed 4 years ago

ariejan commented 6 years ago

Currently known issues

ariejan commented 6 years ago

Steps to setup a new Intercity Next machine:

Known issues:

ariejan commented 6 years ago

The SSH spinner issues has been resolved by downgrading ruby to 2.4.2. There's some changes in how Ruby handles private keys, and this was the fastest way to work around it. Upgrading to Ruby 2.5.1 will be a bit more involved because of that.

Next issues: docker/dokku are installed fine, but not the extra services, like postgresql, redis and mariadb.

ariejan commented 6 years ago

@jvanbaarsen ~is it necessary to run rake intercity:seed_plugins when installing or even when booting? Seems to be the reason I don't have any services installed.~ It seems to be necessary. This task is now run on every boot to update services.

jvanbaarsen commented 6 years ago

@ariejan Aaah yeah good one! The reason that seed task is in there is that I needed a simple way to add new services without having to login on all instances that we have running to update the available services list.

jvanbaarsen commented 6 years ago

@ariejan I'm trying out this PR locally, but I can't seem to get it to work. What domain did you use to test this? Does it have to be a domain that is reachable for letsencrypt? Or can I just use localhost?

ariejan commented 6 years ago

I spun up a €3 vps with hetzner and a real fqdn.

On 7 Aug 2018 at 20:43, wrote:

@ariejan I'm trying out this PR locally, but I can't seem to get it to work. What domain did you use to test this? Does it have to be a domain that is reachable for letsencrypt? Or can I just use localhost?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

jvanbaarsen commented 6 years ago

@ariejan Looks like we can solve the 502 errors with the following snippet in the entrypoint script:

echo "-- Waiting for DB to be active"
while ! pg_isready -h db > /dev/null 2> /dev/null; do
  printf "."
  sleep 1
done

We would then also need to add postgresql-client to the docker file as a dependency to install.

For me this at least solved some of the errors in the logs when the app started earlier then the DB is active.

michiels commented 6 years ago

Very intersting stuff @ariejan! I'll also be checking this out. See if it can be combined or run alongside my other PR where I started a docker-compose setup for local development (then you don't need the nginx and letsencrypt proxies and other magic).

michiels commented 5 years ago

Hi @ariejan

I'm planning on picking up deploying Intercity as Docker (Compose) app again, but you've already done massive important work in this PR Is this PR something you'd like to continue on and ship? Or would you like me to take over?

Thanks for your reply!

Michiel

ariejan commented 5 years ago

@michiels due to time constraints I cannot work on this right now, so feel free to continue working on it. Feel free to mention me here if you have any questions.

michiels commented 5 years ago

Hi @ariejan Perfect! Thank you for your swift reply. I'll analyze your PR and do some follow up steps :)