Compare commits

..
17 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 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 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 2377 additions and 980 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" ]
+2344 -880
View File
File diff suppressed because it is too large Load Diff
+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
+5 -49
View File
@@ -3,76 +3,32 @@ services:
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: numeris_phpmyadmin
restart: unless-stopped
ports:
- 3000:80
links:
- mysql:db
depends_on:
- mysql
networks:
caddy:
labels:
caddy: phpmyadmin.numeris-isep.fr
caddy.reverse_proxy: "{{upstreams 80}}"
mysql:
image: mysql:5.7
container_name: numeris_mysql
restart: unless-stopped
env_file:
- .env
volumes:
- ./var/mysql:/var/lib/mysql
- mysql:/var/lib/mysql
back:
container_name: numeris_back
restart: unless-stopped
build:
context: ./back
dockerfile: Dockerfile
env_file:
- .env
links:
- mysql
depends_on:
- mysql
networks:
caddy:
labels:
caddy: api.numeris-isep.fr
caddy.reverse_proxy: "{{upstreams 8080}}"
front:
container_name: numeris_front
build:
context: ./front
dockerfile: Dockerfile
depends_on:
- back
networks:
caddy:
labels:
caddy: numeris-isep.fr
caddy.reverse_proxy: "{{upstreams 4200}}"
caddy:
image: marcpartensky/caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
environment:
CADDY_INGRESS_NETWORKS: caddy
volumes:
# docker rootless daemon socket https://docs.docker.com/engine/security/rootless/
- /run/user/1000/docker.sock:/var/run/docker.sock
- caddy_data:/data
networks:
caddy:
healthcheck:
test: ["CMD", "curl", "-f", "localhost:80"]
networks:
caddy:
volumes:
caddy_data:
mysql:
+3 -29
View File
@@ -1,28 +1,14 @@
version: "3.9"
version: '3'
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: numeris_phpmyadmin
ports:
- 3000:80
links:
- mysql:db
depends_on:
- mysql
volumes:
- ./var/mysql_testing:/var/lib/mysql
mysql:
image: mysql:5.7
container_name: numeris_mysql
environment:
MYSQL_DATABASE: 'numeris_testing'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
container_name: numeris_mysql
back:
image: numeris-back
container_name: numeris_back
build:
context: ./back
dockerfile: Dockerfile
@@ -39,16 +25,4 @@ services:
- mysql
depends_on:
- mysql
front:
image: numeris-front
container_name: numeris_front
build:
context: ./front
dockerfile: Dockerfile
ports:
- 4200:4200
links:
- back
depends_on:
- back
container_name: numeris_back
+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" ]