Skip to content

Commit

Permalink
Merge ed50f48 into 459fa95
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredup committed May 4, 2019
2 parents 459fa95 + ed50f48 commit abc6d58
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 2 deletions.
2 changes: 0 additions & 2 deletions README.md
Expand Up @@ -78,8 +78,6 @@ $ php bin/console fos:js-routing:dump --callback=define
$ php bin/console bazinga:js-translation:dump --merge-domains
```

Otherwise you can run the app using `app_dev.php` to run it in development mode.

Features
--------

Expand Down
32 changes: 32 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,32 @@
version: "3.3"

services:
db:
image: "mysql:5.7"
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_DATABASE: solidinvoice
MYSQL_ALLOW_EMPTY_PASSWORD: 1
app:
build: "docker"
depends_on:
- db
ports:
- "8000:8000"
restart: always
volumes:
- ".:/opt/srv"
environment:
SOLIDINVOICE_ENV: dev
SOLIDINVOICE_DEBUG: 1
database_driver: pdo_mysql
database_host: db
database_port: 3306
database_name: solidinvoice
database_user: root
database_password:

volumes:
db_data: {}
90 changes: 90 additions & 0 deletions docker/Dockerfile
@@ -0,0 +1,90 @@
FROM php:7.2

ENV TIMEZONE Europe/Paris
ENV TERM xterm
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_HTACCESS_PROTECT 0
ENV COMPOSER_NO_INTERACTION 1
ENV NVM_DIR /root/.nvm
ENV NODE_VERSION 8

COPY --from=composer:1.8 /usr/bin/composer /usr/bin/composer

SHELL ["/bin/bash", "-c"]

RUN apt-get update && \
apt-get install -y apt-utils debconf-utils apt-transport-https && \
apt-get install -y \
build-essential \
${PHPIZE_DEPS} \
libicu-dev \
locales \
zip \
unzip \
unixodbc \
unixodbc-dev \
unixodbc-bin \
libodbc1 \
odbcinst1debian2 \
tdsodbc \
freetds-bin \
freetds-common \
freetds-dev \
libct4 \
libsybdb5 \
libxml2 \
curl \
libcurl3 \
libedit2 \
libicu57 \
git \
acl \
curl \
nano \
openssh-client \
bash \
libmcrypt-dev \
libxml2-dev \
freetds-dev \
gcc \
zlib1g \
zlib1g-dev \
libpng-dev \
libjpeg-dev \
autoconf \
supervisor && \
pecl install apcu && \
pecl install xdebug && \
ln -s /usr/lib/x86_64-linux-gnu/libsybdb.a /usr/lib && \
docker-php-ext-install -j$(nproc) pdo_mysql && \
docker-php-ext-install -j$(nproc) opcache && \
docker-php-ext-install -j$(nproc) bcmath && \
docker-php-ext-install -j$(nproc) intl && \
docker-php-ext-enable apcu && \
curl -sS https://get.symfony.com/cli/installer | bash && \
mv ~/.symfony/bin/symfony /usr/bin/symfony && \
symfony local:server:ca:install && \
mkdir -p $NVM_DIR && \
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash && \
source "$NVM_DIR/nvm.sh" && \
nvm install stable && nvm use stable && \
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- -- && \
$HOME/.yarn/bin/yarn global add gulp && \
cat /root/.bashrc && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen && \
apt-get clean

RUN echo "date.timezone=$TIMEZONE" >> /usr/local/etc/php/php.ini && \
echo "max_execution_time = 60;" >> /usr/local/etc/php/php.ini && \
echo "memory_limit = 512M;" >> /usr/local/etc/php/php.ini

WORKDIR /opt/srv

EXPOSE 80
EXPOSE 443

VOLUME /opt/srv

ENTRYPOINT []

CMD ["symfony", "server:start", "--allow-http"]

0 comments on commit abc6d58

Please sign in to comment.