Skip to content

Instantly share code, notes, and snippets.

@mehrancodes
Created June 21, 2019 14:58
Show Gist options
  • Save mehrancodes/576f9901e9e5dd6a994272360b8e822b to your computer and use it in GitHub Desktop.
Save mehrancodes/576f9901e9e5dd6a994272360b8e822b to your computer and use it in GitHub Desktop.
How to deploy a Laravel app on Fandogh Cloud
FROM alpine
RUN apk update && \
apk add curl \
php7 \
php7-opcache \
php-fileinfo \
php7-openssl \
php7-pdo \
php7-json \
php7-phar \
php7-dom \
php7-curl \
php7-mbstring \
php7-tokenizer \
php7-xml \
php7-xmlwriter \
php7-session \
php7-ctype \
php7-mysqli \
php7-pdo \
php7-pdo_mysql\
&& rm -rf /var/cache/apk/*
RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/bin --filename=composer
COPY . /app
WORKDIR /app
COPY .env.example .env
RUN composer install --quiet
RUN chmod -R 775 storage
RUN chmod -R 775 bootstrap
RUN chmod +x run.sh
ENTRYPOINT ["/app/run.sh"]
kind: ExternalService
name: <SERVICE NAME>
spec:
image: <IMAGE NAME>:<CURRENT IMAGE VERSION>
env:
- name: APP_DEBUG
value: false
- name: DB_HOST
value: <DB HOST NAME>
- name: APP_ENV
value: production
- name: DB_DATABASE
value: <DB DATABASE NAME>
- name: DB_USERNAME
value: <DB USERNAME>
- name: DB_PASSWORD
value: <DB PASSWORD>
#!/bin/sh
set -e
php artisan migrate --force
php artisan key:generate
php artisan jwt:secret
php artisan serve --host=0.0.0.0 --port=80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment