Giter Club home page Giter Club logo

Comments (5)

kjellberg avatar kjellberg commented on September 27, 2024
          You can pass `-c` to specify a different path for the deploy configuration 👍

Originally posted by @dhh in #75 (comment)

Try with:

mv config/deploy.yml .mrskrc
mrsk deploy -c .mrskrc

It doesn't work with mrsk init -c .mrskrc though, so that's something thats needs a fix 🎉

config/deploy.yaml is hardcoded here:

https://github.com/mrsked/mrsk/blob/3026a92c9850be79f0e4f0f691552867bc0b14d6/lib/mrsk/cli/main.rb#L104

from kamal.

99linesofcode avatar 99linesofcode commented on September 27, 2024

Thanks @kjellberg, missed that option. Let's park the idea of a .mrskrc configuration file for now and see whether other usecases arrive that may warrant adding something like that in the future.

from kamal.

andresgutgon avatar andresgutgon commented on September 27, 2024

Hi @99linesofcode you metioned Laravel. Do you have some example repo integrating Kamal with Laravel. Thanks and sorry if this a bit off-topic on this issue

from kamal.

99linesofcode avatar 99linesofcode commented on September 27, 2024

Hi @andresgutgon,

No example repository unfortunately but here's the gist of what I did to deploy a Laravel application succesfully:

  1. Create a base image that copies your source code into /app and host it on a container registry (for example on Github);
  2. Add a healthcheck endpoint (i.e. /up). I've used Spatie's Laravel Health;
  3. Define your deploy.yml and secrets;
  4. Run Kamal. Here is the alias I used when it was still mrsk:
# mrsk
alias mrsk="docker run -it --rm -v $PWD:/workdir -v $HOME/.gitconfig:/root/.gitconfig -v $SSH_AUTH_SOCK:/ssh-agent -v /var/run/docker.sock:/var/run/docker.sock -e SSH_AUTH_SOCK=/ssh-agent ghcr.io/mrsked/mrsk:latest"

Below is an example of the deploy.yml I used:

service: APP_NAME

image: GITHUB_ACCOUNT/IMAGE_NAME
servers:
  - SERVER_IP

registry:
  server: ghcr.io
  username: 99linesofcode
  password:
    - MRSK_REGISTRY_PASSWORD

builder:
  multiarch: false

healthcheck:
  path: /up
  port: 80

Good luck!

from kamal.

andresgutgon avatar andresgutgon commented on September 27, 2024

Thanks! I'll try and let you know

from kamal.

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.