Compare commits

..
14 Commits
Author SHA1 Message Date
marc efa378fe8f Merge branch 'php7.4' into marc
Docker / build (push) Canceled after 0s
2022-09-16 19:31:29 +02:00
marc 07dbb05443 opt 2022-09-16 19:30:39 +02:00
marc 7e8e7112da Merge branch 'php7.4' into marc 2022-09-16 19:16:45 +02:00
marc d18074c556 Merge branch 'docker-compose' into php7.4 2022-09-16 19:16:17 +02:00
marc 290c7e9803 Merge php7.4 2022-09-16 19:11:51 +02:00
marc b64f7bfbd1 Merge github-action 2022-09-16 19:11:23 +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
marc c64058fff0 update of composer 2022-09-15 16:45:37 +02:00
7 changed files with 2443 additions and 923 deletions
+31
View File
@@ -0,0 +1,31 @@
name: Docker
on:
push:
branches:
- "*"
- "!master"
# Publish `v1.2.3` tags as releases.
tags:
- v*
# Run tests for any PRs.
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Fake env file
run: touch .env
- name: Build
run: docker-compose -f docker-compose.production.yml build back
+38
View File
@@ -0,0 +1,38 @@
name: Docker
on:
push:
branches:
- "master"
# Publish `v1.2.3` tags as releases.
tags:
- v*
# Run tests for any PRs.
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
context: back
dockerfile: Dockerfile.production
push: true
tags: marcpartensky/numeris-back:latest
+7 -10
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,15 @@ 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 /opt/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 /opt/numeris
RUN chown -R www-data:www-data /var/log/apache2/
WORKDIR /home/numeris
+6 -10
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,18 @@ 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 /opt/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 /opt/numeris
RUN chown -R www-data:www-data /var/log/apache2/
WORKDIR /home/numeris
RUN php artisan config:cache
RUN php artisan route:cache
+2344 -880
View File
File diff suppressed because it is too large Load Diff
+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:
+5 -3
View File
@@ -1,16 +1,18 @@
FROM node:11.15.0
WORKDIR /home/numeris
RUN mkdir -p /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 . .
COPY . /home/numeris
RUN npm rebuild node-sass
ENTRYPOINT [ "ng", "s", "--host", "0.0.0.0" ]
WORKDIR /home/numeris