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

Add Dockerfile #363

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .editorconfig

This file was deleted.

12 changes: 7 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_HOST=fill-with-rds-endpoint
DB_PORT=3306
DB_DATABASE=velflix
DB_USERNAME=root
DB_PASSWORD=
DB_DATABASE=fill-with-db-name
DB_USERNAME=fill-with-rds-username
DB_PASSWORD=fill-with-rds-password

TMDB_TOKEN=fill-with-tmdb-token

BROADCAST_DRIVER=log
CACHE_DRIVER=file
Expand Down Expand Up @@ -48,7 +50,7 @@ PUSHER_APP_CLUSTER=mt1
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

TMDB_TOKEN=


MAILCHIMP_KEY=
MAILCHIMP_LIST_SUBSCRIBERS=
Expand Down
5 changes: 0 additions & 5 deletions .gitattributes

This file was deleted.

97 changes: 0 additions & 97 deletions .github/workflows/php-lint.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions .styleci.yml

This file was deleted.

56 changes: 56 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# base image using php and apache
FROM php:8.1.18RC1-apache-bullseye

# change the working directory
WORKDIR /var/www/html

# change directory permission so can be acceesd with root
RUN chown -R root /var/www/html

# move all files into working directory
COPY . .

# set neccesary environment variables in the .env.example and copy its content to .env
COPY .env.example .env
#===================================================================================

# install dependencies
## dependecies for composer
RUN apt-get update && apt-get install -y \
curl \
git \
zip \
unzip
### installing composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

#### running composer
RUN composer install

## genereate key
RUN php artisan key:generate

# install frontend depenedencies and running npm install and npm run build
RUN apt-get update && apt-get install -y npm
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs

# run npm install && npm run build
RUN npm install
RUN npm run build

# install driver for connect php to mysql
RUN docker-php-ext-install pdo pdo_mysql

# run php migrate
RUN php artisan migrate

# run php seeder for create 2 users as default
RUN php artisan db:seed

# run server
CMD [ "php", "artisan", "serve", "--host=0.0.0.0" ]

# final step, run docker with container name, port-forwarding 8000:8000 and image name
# docker run --name velflix -p 8000:8000 -d velflix

21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

Loading