Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
122 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |