Skip to content

Commit

Permalink
add a docker structure, makefile, docker-compose definitions, and fix…
Browse files Browse the repository at this point in the history
… the connect string to require a port. Commit nginx and key configs
  • Loading branch information
mierst committed Nov 3, 2020
1 parent 8c4ad50 commit 042c30c
Show file tree
Hide file tree
Showing 20 changed files with 6,170 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .docker/logos
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM nginx:latest

VOLUME /code
WORKDIR /code

COPY static/nginx/logos.conf /etc/nginx/conf.d/
COPY static/nginx/certs/logos.elohell.gg /etc/ssl/certs/
COPY . /code

RUN rm /etc/nginx/conf.d/default.conf && rm /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
16 changes: 16 additions & 0 deletions .docker/php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM php:7-fpm

WORKDIR /code

RUN apt update && \
apt install -y git libpng-dev zlib1g-dev && \
docker-php-ext-install mysqli && \
docker-php-ext-install gd
COPY static/php/www.conf /usr/local/etc/php-fpm.d/www.conf
COPY static/php/composer_install.php /code/composer_install.php
RUN php composer_install.php && mv composer.phar /usr/local/bin/composer && rm composer_install.php
COPY static/php/composer.auth.json /root/.composer/auth.json
COPY static/php/composer.json /code/composer.json
RUN composer install
COPY . /code
RUN composer update && composer install
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#static/*
*.csv
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.PHONY: build run restart

build: build-logos build-php

build-logos:
docker-compose build logos

build-php:
docker-compose build php

rebuild:
docker-compose build --no-cache logos

run:
docker-compose up -d

stop:
docker-compose down

logs:
docker-compose logs -f
11 changes: 11 additions & 0 deletions dbdump.sql

Large diffs are not rendered by default.

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.7"
services:
logos:
image: elohell:logos
build:
context: .
dockerfile: .docker/logos
ports:
- "4000:4000"
env_file:
- .env
links:
- php

php:
build:
context: .
dockerfile: .docker/php
env_file:
- .env
Loading

0 comments on commit 042c30c

Please sign in to comment.