Giter VIP home page Giter VIP logo

Comments (5)

gazayas avatar gazayas commented on June 15, 2024 1

@jagthedrummer I'm open to either solution, thinking back on this one I just remember this being pretty difficult to implement. A lot has changed since then though, so if we want to prioritize it I can take another shot at it.

from bullet_train.

jagthedrummer avatar jagthedrummer commented on June 15, 2024 1

@gazayas no need to prioritize it as far as I'm concerned.

from bullet_train.

gazayas avatar gazayas commented on June 15, 2024

As you can tell by the number of commits on the branch I started working on, this one's taking some effort to get moving. I've been going back and forth with Digital Ocean's support team for a bit and have gotten to the point where the site is deployed, but I'm getting an error when trying to actually access the site.

Although it's kind of old, I'm putting this video here for reference.

Currently trying to attach a database, since the details in the template I wrote aren't seeming to pick up on production: true.

from bullet_train.

gazayas avatar gazayas commented on June 15, 2024

@andrewculver I’ve spent a decent amount of time on this, and I’ve come to the conclusion that a one-click deploy button is great for static websites and applications early in the development process, but for a number of reasons I don’t think that this is currently a viable option for Bullet Train and that BT devs will be better off simply going the whole 9 yards by setting up everything via Digital Ocean for their Bullet Train.

Here are the reasons why:

  1. You can only make a dev database to experiment with deployment. Upgrading to a production-ready database involves more steps.
  2. You can’t get the DATABASE_URL connection string until after the app successfully deploys. You then grab it from the db settings and set it as an environment variable (in my opinion, Render took care of this better in that you didn’t need to have a successful deployment first).
  3. After you finally set the connection string, THAT’S when you run rake db:migrate in the console. I wanted to automate this step instead of just write it in the console so I asked customer support about it, and they said I needed to use a post-deploy job for this. This isn’t something configured in the deploy template, but in the dashboard. It takes a few steps which can be read in this page in the docs that customer support sent to me.
  4. We usually run bin/dev to spin up multiple processes. In the app platform, which is what one-click deployment uses, each component is one container so we can’t use multiple servers (rails s + sidekiq, etc.). Customer support told me however that this can be done by creating a droplet. If it comes to that, I think Bullet Train devs would just better off configuring a droplet from the start and deploying that way.

I’ve read a bunch of Digital Ocean’s articles in the past and I’m sure their service is great, I just think that trying to use one-click deployment will cause more headaches than anything when a lot else has to be configured just to get things moving. The impression I also get from the one-click docs is that it's used more just to test things out, and not for full-on production.

By the way, here’s the spec I used in the digital-ocean-deployment branch:

spec:
  name: bullet-train
  services:
    - name: web
      git:
        repo_clone_url: https://github.com/gazayas/bullet_train.git
        branch: digital-ocean-deployment
      envs:
        - key: BASE_URL
          # TODO: Replace this with the URL Digital Ocean provides after successfully deploying your application.
          value: http://localhost:3000/
          scope: RUN_AND_BUILD_TIME
        - key: SECRET_KEY_BASE
          scope: RUN_AND_BUILD_TIME
  databases:
    - name: bullet-train-dev
      engine: PG
      production: false

Also, here is the deployed website after attaching the connection string and migrating the database.

from bullet_train.

jagthedrummer avatar jagthedrummer commented on June 15, 2024

@gazayas @andrewculver It sounds like maybe the thing to do here is to provide a page in the /docs area that describes how to deploy to Digital Ocean. Unless things have changed significantly at DO over the last year?

from bullet_train.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.