Updated: 2024-04-16
Read more at: https://coolify.io/docs/knowledge-base/git/gitlab/integration#private-repositories
Following Steps are outdated
Step 1: Connect Coolify with GitLab:
- Login
coolify
dashboard - Click on Git Sources
- Click on Add > GitLab.com
- First enter the
HTML URL
, it theurl
wheregitlab
is hosted - Then enter
API
which is<gitlab-url>/api
- Then Choose
GitLab Application Type
, it should beInstance-wide application (self-hosted)
- Now, visit your
<gitlab-url>/admin/applications
and click onNew Application
. Enter the application name eg:coolify
, inRedirect URI
enter theWebhook URL
from yourcoolify
page: Screenshot
And choose api
, read_respository
, email
then Click Save application
.
On next page, you'll the the OAuth ID
, Application ID
& Secret
:
Screenshot - OAuth ID
Once, this is done, we're ready to deploy the apps.
Step 2: Create a repository and clone
Step 3: Setup laravel
Step 4: Create a Dockerfile
at the root of the project:
FROM docker.io/bitnami/laravel:9
COPY . .
RUN composer install
CMD php artisan serve --host=0.0.0.0
EXPOSE 443
Commit all the files.
Step 5: Point your domain to coolify
ip.
To do this you need to add 2 A record from your domain control panel:
A <project>.domain-name.com xxx.xxx.xxx.xxx
A *.<project>.domain-name.com xxx.xxx.xxx.xxx
xxx.xxx.xxx.xxx
is your coolify
server ip.
Step 6: Deploy Laravel
- From
coolify
dashboard, click onApplications
- Click on "+" icon and select source
- Select your repository
- Select the Destination
- Select
Docker
at "Configure Build Pack" screen - Now, on
General
page, choose following options:
URL (FQDN): <project>.domain-name.com
Port: 8000
Dockerfile Location: /Dockerfile
Base Directory: (keep the default value)
Enable Automatic Deployment: Enabled
Enable MR/PR Previews: Enableed
Debug Logs: Enabled
- Click
Save
and Click onBuild Logs
, after success build visit the url, you will be able to see the Laravel.
Top comments (2)
Not working on Collify, this post is cloned from a very old post., you should test before posting
@demo_felhasznalo_5f85531e I have already written
Following Steps are out dated