Commit 13238cb6 authored by Connor Tumbleson's avatar Connor Tumbleson

docker support (beta)

parent ae8dc18f
Pipeline #989 failed with stages
in 3 minutes and 16 seconds
......@@ -9,10 +9,10 @@ GOOGLE_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
XBOXAPI_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
HALO5_KEY=xx
DB_HOST=localhost
DB_DATABASE=xxx
DB_USERNAME=xxx
DB_PASSWORD=xxx
DB_HOST=127.0.0.1
DB_DATABASE=pandalove
DB_USERNAME=root
DB_PASSWORD=secret
REDIS_SCHEME=tcp
CACHE_DRIVER=file
......
......@@ -103,7 +103,7 @@ return [
'key' => env('APP_KEY', 'SomeRandomString'),
'cipher' => MCRYPT_RIJNDAEL_128,
'cipher' => "AES-256-CBC",
/*
|--------------------------------------------------------------------------
......
version: '2'
services:
web:
build:
context: ./
dockerfile: docker/web.docker
volumes:
- ./:/var/www
ports:
- "8080:80"
links:
- app
app:
build:
context: ./
dockerfile: docker/app.docker
container_name: pandalove
volumes:
- ./:/var/www
links:
- database
- cache
environment:
- "DB_PORT=3306"
- "DB_HOST=database"
- "REDIS_PORT=6379"
- "REDIS_HOST=cache"
database:
image: mysql:5.6
environment:
- "MYSQL_ROOT_PASSWORD=secret"
- "MYSQL_DATABASE=pandalove"
ports:
- "33061:3306"
cache:
image: redis:3.0
ports:
- "63791:6379"
\ No newline at end of file
FROM php:7-fpm
RUN apt-get update && apt-get install -y libmcrypt-dev mysql-client git zip libpng-dev \
&& docker-php-ext-install mcrypt pdo_mysql bcmath zip gd
# Make sure we're installing what we think we're installing!
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
&& curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \
&& php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" \
&& php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer --snapshot \
&& rm -f /tmp/composer-setup.*
# We should use another container for this, since we are mixing PHP and Node
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get install -y nodejs
# Installing yarn
RUN curl -o- -L https://yarnpkg.com/install.sh | bash
WORKDIR /var/www
\ No newline at end of file
server {
listen 80;
index index.php index.html;
root /var/www/public;
location / {
try_files $uri /index.php?$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
\ No newline at end of file
FROM nginx:1.10
ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf
WORKDIR /var/www
\ No newline at end of file
......@@ -24,6 +24,10 @@ supporting now 3 full games (Destiny, Halo 5 & Overwatch) with countless plugins
* Determines Xur loadout, API endpoint for Google Hangouts
* Grimoire Module
* Determines grimoire over API for any user
* Destiny 2
* Profile Pages
* Character gear
* Light, playtime
* Halo 5
* Profile Pages
* Warzone (Overview, Medals, Weapons)
......@@ -78,6 +82,7 @@ supporting now 3 full games (Destiny, Halo 5 & Overwatch) with countless plugins
* Update Destiny stats via `/bot destiny`
* Update Overwatch stats via `/bot ow`
* Update Halo5 stats via `/bot h5`
* Update Destiny2 stats via `/bot d2`
## Contributors
* [Contributors](https://github.com/iBotPeaches/PandaLove/graphs/contributors)
......@@ -117,6 +122,21 @@ supporting now 3 full games (Destiny, Halo 5 & Overwatch) with countless plugins
- `php artisan halo5:batch-metadata`
- `php artisan serve`
## How to install (Docker)
- `docker-compose up --build`
- `docker exec -it pandalove bash`
- (context inside that container)
- `cp .env.example .env`
- `composer install`
- `yarn install`
- `npm install -g gulp`
- `cd node_modules/semantic-ui; gulp build; cd ../..;`
- Go do API stuff above
- `php artisan migrate`
- `php artisan db:seed`
- `php artisan halo5:batch-metadata`
- visit `localhost:8080` in browser
## Thanks
* 343 - Halo 5 API - [https://developer.haloapi.com](https://developer.haloapi.com)
* Bungie - Destiny API - [https://bungie.net](https://bungie.net)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment