Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab CI/CD Deployment #18

Open
mrlinnth opened this issue Dec 14, 2021 · 1 comment
Open

GitLab CI/CD Deployment #18

mrlinnth opened this issue Dec 14, 2021 · 1 comment

Comments

@mrlinnth
Copy link

Not really an issue. Just seeking advice and guidance.

I just found and learned to use CapRover today. Your template helped and I have successfully deployed my laravel app to my server. My repo is on GitLab and I'm currently using webhook for auto deployment.

I would like to use GitLab CI/CD for the deployment instead of webhook. How can I set up CI/CD with this template?

I have read the CapRover docs for CICD but I am not very clear. It says to just use Docker file, so should I delete captain-definiton file and move Docker out of .deploy folder? And do I have to update the variables in the Docker file or just use as it is?

I'm noob at docker and all this.
Any help is appreciated.

@ezra-obiwale
Copy link

ezra-obiwale commented Dec 31, 2021

@mrlinnth Here's a stripped-down version of the ci/cd config I use

# THE FOLLOWING VARIABLES MUST BE CONFIGURED AS CI/CD VARIABLES
#
# - CAPROVER_URL
# - CAPROVER_PASSWORD

variables:
  APP_NAME: YourAwesomeApp
  CAPROVER_APP: your-awesome-app
  APP_URL: https://www.awesome-app.com
  DOCKER_DRIVER: overlay2

deploy:
  image: node:14.3-alpine
  environment:
    name: production
    url: $APP_URL
  only:
    - master
  script:
    - tar -cvf ./deploy.tar ./*
    - npm i -g caprover
    - caprover deploy -t ./deploy.tar -a $CAPROVER_APP

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants