Add basic arkhamdb setup
This commit is contained in:
commit
fce630b6c9
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/arkhamdb-json-data/
|
||||||
|
/arkhamdb/
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM php:fpm
|
||||||
|
RUN docker-php-ext-install mysqli pdo pdo_mysql
|
||||||
|
|
||||||
|
COPY ./arkhamdb/ /srv
|
||||||
|
RUN chown -R www-data: /srv
|
||||||
|
COPY parameters.yml /srv/app/config/parameters.yml
|
||||||
|
|
||||||
|
COPY --from=composer:1 /usr/bin/composer /usr/bin/composer
|
||||||
|
RUN cd /srv/ && composer install
|
29
docker-compose.yml
Normal file
29
docker-compose.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
arkhamdb:
|
||||||
|
build: .
|
||||||
|
working_dir: /var/www/html
|
||||||
|
depends_on:
|
||||||
|
- database
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./arkhamdb-json-data:/srv/arkhamdb-json-data
|
||||||
|
- ./000-default.conf:/etc/apache2/sites-enabled/000-default.conf
|
||||||
|
nginx:
|
||||||
|
image: nginx
|
||||||
|
depends_on:
|
||||||
|
- arkhamdb
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:80:80
|
||||||
|
volumes:
|
||||||
|
- ./arkhamdb:/srv
|
||||||
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
||||||
|
database:
|
||||||
|
image: mariadb
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
||||||
|
MYSQL_DATABASE: arkhamdb
|
||||||
|
MYSQL_USER: arkhamdb
|
||||||
|
MYSQL_PASSWORD: arkhamdb
|
38
nginx.conf
Normal file
38
nginx.conf
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
root /srv/web/;
|
||||||
|
index app.php;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
# try to serve file directly, fallback to app.php
|
||||||
|
try_files $uri /app.php$is_args$args;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/app\.php(/|$) {
|
||||||
|
fastcgi_pass arkhamdb:9000;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||||
|
fastcgi_param SCRIPT_FILENAME /srv/web/app.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
|
||||||
|
# When you are using symlinks to link the document root to the
|
||||||
|
# current version of your application, you should pass the real
|
||||||
|
# application path instead of the path to the symlink to PHP
|
||||||
|
# FPM.
|
||||||
|
# Otherwise, PHP's OPcache may not properly detect changes to
|
||||||
|
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
|
||||||
|
# for more information).
|
||||||
|
fastcgi_param SCRIPT_FILENAME /srv/web/app.php;
|
||||||
|
fastcgi_param DOCUMENT_ROOT /srv/web;
|
||||||
|
# Prevents URIs that include the front controller. This will 404:
|
||||||
|
# http://domain.tld/app.php/some-path
|
||||||
|
# Remove the internal directive to allow URIs like this
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
|
||||||
|
# return 404 for all other php files not matching the front controller
|
||||||
|
# this prevents access to other php files you don't want to be accessible.
|
||||||
|
location ~ \.php$ {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
}
|
32
parameters.yml
Normal file
32
parameters.yml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
parameters:
|
||||||
|
database_host: database
|
||||||
|
database_port: 3306
|
||||||
|
database_name: arkhamdb
|
||||||
|
database_user: arkhamdb
|
||||||
|
database_password: arkhamdb
|
||||||
|
|
||||||
|
mailer_transport: smtp
|
||||||
|
mailer_host: 127.0.0.1
|
||||||
|
mailer_user: null
|
||||||
|
mailer_password: null
|
||||||
|
|
||||||
|
# A secret key that's used to generate certain security-related tokens
|
||||||
|
secret: ThisTokenIsNotSoSecretChangeIt
|
||||||
|
|
||||||
|
# units: seconds
|
||||||
|
cache_expiration: 600
|
||||||
|
|
||||||
|
# Email sender
|
||||||
|
email_sender_address: whatever@example.com
|
||||||
|
email_sender_name: Whatever
|
||||||
|
|
||||||
|
# Branding
|
||||||
|
website_name: Docker ArkhamDB
|
||||||
|
website_url: localhost
|
||||||
|
game_name: Arkham Horror LCG
|
||||||
|
publisher_name: Fantasy Flight Games
|
||||||
|
|
||||||
|
# Analytics & AdSense
|
||||||
|
google_analytics_tracking_code: UA-00000000-1
|
||||||
|
google_adsense_client: ca-pub-000000000000000
|
||||||
|
google_adsense_slot: 0000000000
|
10
setup.sh
Executable file
10
setup.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
git clone https://github.com/Kamalisk/arkhamdb
|
||||||
|
git clone https://github.com/ad1217/arkhamdb-json-data
|
||||||
|
|
||||||
|
docker-compose up -d
|
||||||
|
|
||||||
|
docker-compose exec -T -w /srv/ arkhamdb php bin/console doctrine:schema:create
|
||||||
|
docker-compose exec -T -w /srv/ arkhamdb php bin/console app:import:std ./arkhamdb-json-data/
|
Loading…
Reference in New Issue
Block a user