Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
vendor/
composer.phar
18 changes: 18 additions & 0 deletions .env.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString
APP_URL=http://0.0.0.0:8888

# php mysql connection details
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_NAME=openchat
DB_USER=openchat
DB_PASSWORD=openchat

# Variables for Database creation in mysql container
MYSQL_ROOT_PASSWORD=root_pass
MYSQL_DATABASE=openchat
MYSQL_USER=openchat
MYSQL_PASSWORD=openchat
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM php:7.3-apache

#Install git
RUN apt-get update && apt-get install -y git zip unzip npm
RUN docker-php-ext-install pdo pdo_mysql mysqli
RUN a2enmod rewrite

WORKDIR /var/www/html
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php --install-dir=. --filename=composer
COPY composer.json package.json ./
RUN ./composer install
RUN npm install
COPY . /var/www/html/
EXPOSE 80
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3'
services:
website:
image: openchat
build: .
ports:
- 8888:80
env_file:
- .env.docker
depends_on:
- mysql
mysql:
image: mysql/mysql-server
command: --default-authentication-plugin=mysql_native_password
env_file:
- .env.docker
volumes:
- ./sql:/docker-entrypoint-initdb.d
ports:
- "3306:3306"