Compare commits

..
Author SHA1 Message Date
marc eaea9577ea home is back instead of opt 2022-09-24 20:11:10 +02:00
marc ca176b628a entrypoint for prod is a must 2022-09-21 16:49:20 +02:00
marc fc7a469181 apache2-foreground 2022-09-21 16:40:56 +02:00
marc decd443031 rip exec 2022-09-21 16:30:23 +02:00
marc 6ee3e34d0c forcing every command 2022-09-20 15:38:58 +02:00
marc d2ca350fd4 executable 2022-09-20 15:37:34 +02:00
marc ddf8132963 absolute path 2022-09-20 15:35:54 +02:00
marc 7e14892de1 overloading entrypoint 2022-09-20 15:33:56 +02:00
marc fb944657b5 dockerfile 2022-09-19 10:57:56 +02:00
marc 07dbb05443 opt 2022-09-16 19:30:39 +02:00
marc d18074c556 Merge branch 'docker-compose' into php7.4 2022-09-16 19:16:17 +02:00
marc a6b9888cfe production 2022-09-16 19:06:08 +02:00
marc 6d40239a13 Merge branch 'back-dockerfile-clean' into php7.4 2022-09-16 18:47:05 +02:00
marc 57fb4d7639 clean dev 2022-09-16 18:46:53 +02:00
marc 36ea133390 clean production 2022-09-16 18:46:21 +02:00
marc 9f28d25eb7 production too 2022-09-16 18:43:47 +02:00
marc 8f69143715 3.9 2022-09-16 18:43:11 +02:00
marc 739212ea0a update to php7.4 - build ok 2022-09-16 18:39:19 +02:00
5 changed files with 37 additions and 42 deletions
+7 -8
View File
@@ -1,6 +1,4 @@
FROM php:7.2-apache
RUN mkdir -p /home/numeris
FROM php:7.4-apache
# Install packages
RUN apt-get update && apt-get install -y \
@@ -8,7 +6,9 @@ RUN apt-get update && apt-get install -y \
zip \
unzip \
nano \
libpng-dev
libpng-dev \
libzip-dev
# Install the PHP mcrypt pdo_mysql extension
RUN docker-php-ext-install pdo_mysql gd zip
@@ -21,18 +21,17 @@ RUN a2dissite 000-default.conf && a2ensite numeris.conf && a2enmod rewrite && se
# Enable php conf
COPY docker/php/php.ini /usr/local/etc/php/conf.d/default.ini
COPY . /home/numeris
WORKDIR /home/numeris
COPY . .
# Composer install
WORKDIR /home/numeris
RUN composer install --no-interaction
# Final touch
RUN . ~/.bashrc
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN usermod -u 1000 www-data
RUN chown -R www-data:www-data /home/numeris
RUN chown -R www-data:www-data /var/log/apache2/
WORKDIR /home/numeris
ENTRYPOINT [ "/home/numeris/entrypoint.sh" ]
+7 -9
View File
@@ -1,6 +1,4 @@
FROM php:7.2-apache
RUN mkdir -p /home/numeris
FROM php:7.4-apache
# Install packages
RUN apt-get update && apt-get install -y \
@@ -8,7 +6,8 @@ RUN apt-get update && apt-get install -y \
zip \
unzip \
nano \
libpng-dev
libpng-dev \
libzip-dev
# Install the PHP mcrypt pdo_mysql extension
RUN docker-php-ext-install pdo_mysql gd zip
@@ -20,21 +19,20 @@ RUN a2dissite 000-default.conf && a2ensite numeris.conf && a2enmod rewrite && se
# Enable php conf
COPY docker/php/php.ini /usr/local/etc/php/conf.d/default.ini
COPY . /home/numeris
WORKDIR /home/numeris
COPY . .
### Back config ###
WORKDIR /home/numeris
RUN composer install --optimize-autoloader --no-dev --no-interaction
# Final touch
RUN . ~/.bashrc
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN usermod -u 1000 www-data
RUN chown -R www-data:www-data /home/numeris
RUN chown -R www-data:www-data /var/log/apache2/
WORKDIR /home/numeris
RUN php artisan config:cache
RUN php artisan route:cache
ENTRYPOINT [ "/home/numeris/entrypoint.sh" ]
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env sh
php artisan key:generate --force
php artisan jwt:secret --force
php artisan migrate:refresh --seed --force
docker-php-entrypoint
apache2-foreground
+12 -20
View File
@@ -1,42 +1,34 @@
version: '3'
version: "3.9"
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
restart: unless-stopped
ports:
- 3000:80
links:
- mysql:db
depends_on:
- mysql
container_name: numeris_phpmyadmin
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: 'numeris'
restart: unless-stopped
env_file:
- .env
volumes:
- ./var/mysql:/var/lib/mysql
container_name: numeris_mysql
- mysql:/var/lib/mysql
back:
build:
context: ./back
dockerfile: Dockerfile.production
environment:
APP_ENV: production
APP_DEBUG: 'false'
DB_CONNECTION: mysql
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_DATABASE: ${DB_DATABASE}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
ports:
- ${BACK_PORT}:80
dockerfile: Dockerfile
env_file:
- .env
links:
- mysql
depends_on:
- mysql
container_name: numeris_back
volumes:
mysql:
+3 -5
View File
@@ -1,18 +1,16 @@
FROM node:11.15.0
RUN mkdir -p /home/numeris
WORKDIR /home/numeris
ENV PATH /home/numeris/node_modules/.bin:$PATH
COPY package*.json /home/numeris/
# npm install
WORKDIR /home/numeris
RUN npm install
RUN npm install -g @angular/cli@7.3.9
COPY . /home/numeris
COPY . .
RUN npm rebuild node-sass
WORKDIR /home/numeris
ENTRYPOINT [ "ng", "s", "--host", "0.0.0.0" ]