Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf1eb19369 | ||
|
|
5f3eb5399e | ||
|
|
b14654d2a5 | ||
|
|
4d4a423a6c | ||
|
|
79db3c1fcf | ||
|
|
13ff5bafe7 | ||
|
|
5041afe20d | ||
|
|
40cf30d84e | ||
|
|
0ac9e861eb | ||
|
|
083c62bf5d | ||
|
|
d377682495 | ||
|
|
5e93d72f14 | ||
|
|
66839cf38b | ||
|
|
99c79ab92f | ||
|
|
51dbf08c41 | ||
|
|
fc8c1611fa | ||
|
|
13bfdf606d | ||
|
|
4dc06d439d | ||
|
|
826bf35bc4 | ||
|
|
a61a4d76ff | ||
|
|
c364757cf4 | ||
|
|
a4409fe221 |
+5
-1
@@ -17,7 +17,11 @@ RUN docker-php-ext-install pdo_mysql gd zip
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
# Enable apache conf
|
||||
COPY docker/apache/numeris.conf /etc/apache2/sites-available/numeris.conf
|
||||
RUN a2dissite 000-default.conf && a2ensite numeris.conf && a2enmod rewrite && service apache2 restart
|
||||
RUN a2dissite 000-default.conf && \
|
||||
a2ensite numeris.conf && \
|
||||
a2enmod headers && \
|
||||
a2enmod rewrite && \
|
||||
service apache2 restart
|
||||
# Enable php conf
|
||||
COPY docker/php/php.ini /usr/local/etc/php/conf.d/default.ini
|
||||
|
||||
|
||||
@@ -15,7 +15,11 @@ RUN docker-php-ext-install pdo_mysql gd zip
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
# Enable apache conf
|
||||
COPY docker/apache/numeris.conf /etc/apache2/sites-available/numeris.conf
|
||||
RUN a2dissite 000-default.conf && a2ensite numeris.conf && a2enmod rewrite && service apache2 restart
|
||||
RUN a2dissite 000-default.conf && \
|
||||
a2ensite numeris.conf && \
|
||||
a2enmod headers && \
|
||||
a2enmod rewrite && \
|
||||
service apache2 restart
|
||||
# Enable php conf
|
||||
COPY docker/php/php.ini /usr/local/etc/php/conf.d/default.ini
|
||||
|
||||
|
||||
+11
-3
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"name": "2seg/numeris-v2",
|
||||
"description": "Home of the new website of Numéris.",
|
||||
"keywords": ["Numéris", "association", "website"],
|
||||
"keywords": [
|
||||
"Numéris",
|
||||
"association",
|
||||
"website"
|
||||
],
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"authors": [
|
||||
@@ -14,6 +18,11 @@
|
||||
"name": "MinhNam Nguyen",
|
||||
"email": "nguyen.minhnam@hotmail.fr",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Marc Partensky",
|
||||
"email": "marc@marcpartensky.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
@@ -51,8 +60,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"dont-discover": [
|
||||
]
|
||||
"dont-discover": []
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -6,10 +6,13 @@
|
||||
# Force HTTPS when X-Forwarded-Proto is passed as HTTPS
|
||||
# Useful when the reverse proxy is in HTTPS
|
||||
SetEnvIf x-forwarded-proto https HTTPS=on
|
||||
# Header set Access-Control-Allow-Origin "*"
|
||||
# Header set Access-Control-Allow-Origin "numeris-isep.fr"
|
||||
Header set Access-Control-Allow-Origin "https://numeris-isep.fr"
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog /var/log/apache2/numeris-error.log
|
||||
CustomLog /var/log/apache2/numeris-access.log combined
|
||||
ErrorLog /var/log/apache2/error.log
|
||||
CustomLog /var/log/apache2/access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
+6
-4
@@ -1,10 +1,12 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
php artisan key:generate --force
|
||||
php artisan jwt:secret --force
|
||||
php artisan cache:clear
|
||||
php artisan key:generate
|
||||
# php artisan key:generate --force
|
||||
php artisan jwt:secret
|
||||
# php artisan jwt:secret --force
|
||||
# php artisan cache:clear
|
||||
php artisan config:clear
|
||||
php artisan migrate:refresh --seed --force
|
||||
php artisan migrate:refresh
|
||||
|
||||
docker-php-entrypoint
|
||||
apache2-foreground
|
||||
|
||||
@@ -24,10 +24,13 @@ services:
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- mysql
|
||||
ports:
|
||||
- 127.0.0.1:3306:3306
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./var/mysql:/var/lib/mysql
|
||||
# - /var/run/mysqld:/var/run/mysqld
|
||||
|
||||
back:
|
||||
image: numerisisep/numeris-back
|
||||
@@ -48,7 +51,7 @@ services:
|
||||
labels:
|
||||
caddy: api.numeris-isep.fr
|
||||
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||
caddy.reverse_proxy.header_down: -Access-Control-Allow-Origin
|
||||
# caddy.reverse_proxy.header_down: -Access-Control-Allow-Origin
|
||||
|
||||
front:
|
||||
image: numerisisep/numeris-front
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin:latest
|
||||
container_name: numeris_phpmyadmin
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 3000:80
|
||||
links:
|
||||
- mysql:db
|
||||
depends_on:
|
||||
- mysql
|
||||
networks:
|
||||
- caddy
|
||||
- mysql
|
||||
labels:
|
||||
caddy: phpmyadmin.staging.numeris-isep.fr
|
||||
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||
|
||||
# mysql:
|
||||
# image: mysql:5.7
|
||||
# container_name: numeris_mysql
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - mysql
|
||||
# env_file:
|
||||
# - .env
|
||||
# volumes:
|
||||
# - ./var/mysql:/var/lib/mysql
|
||||
|
||||
back:
|
||||
image: numerisisep/numeris-back
|
||||
container_name: numeris_back
|
||||
restart: unless-stopped
|
||||
build:
|
||||
context: ./back
|
||||
dockerfile: Dockerfile.production
|
||||
networks:
|
||||
- caddy
|
||||
- mysql
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- .env:/home/numeris/.env
|
||||
depends_on:
|
||||
- mysql
|
||||
labels:
|
||||
caddy: api.staging.numeris-isep.fr
|
||||
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||
# caddy.reverse_proxy.header_down: -Access-Control-Allow-Origin
|
||||
|
||||
front:
|
||||
image: numerisisep/numeris-front
|
||||
container_name: numeris_front
|
||||
build:
|
||||
context: ./front
|
||||
dockerfile: Dockerfile.production
|
||||
networks:
|
||||
- caddy
|
||||
labels:
|
||||
caddy: staging.numeris-isep.fr
|
||||
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||
|
||||
|
||||
# caddy:
|
||||
# image: lucaslorentz/caddy-docker-proxy:ci-alpine
|
||||
# restart: unless-stopped
|
||||
# environment:
|
||||
# CADDY_INGRESS_NETWORKS: caddy
|
||||
# ports:
|
||||
# - "80:80"
|
||||
# - "443:443"
|
||||
# volumes:
|
||||
# # docker rootless daemon socket https://docs.docker.com/engine/security/rootless/
|
||||
# - /var/run/docker.sock:/var/run/docker.sock
|
||||
# - caddy_data:/data
|
||||
# networks:
|
||||
# - caddy
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "-f", "localhost:80"]
|
||||
|
||||
networks:
|
||||
caddy:
|
||||
external: true
|
||||
mysql:
|
||||
|
||||
volumes:
|
||||
caddy_data:
|
||||
mysql:
|
||||
@@ -1,58 +0,0 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin:latest
|
||||
container_name: numeris_phpmyadmin
|
||||
restart: unless-stopped
|
||||
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
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_DATABASE: 'numeris_testing'
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
|
||||
|
||||
back:
|
||||
image: numerisisep/numeris-back
|
||||
container_name: numeris_back
|
||||
restart: unless-stopped
|
||||
build:
|
||||
context: ./back
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
DB_CONNECTION: testing
|
||||
DB_HOST_TESTING: mysql
|
||||
DB_PORT_TESTING: 3306
|
||||
DB_DATABASE_TESTING: numeris_testing
|
||||
DB_USERNAME_TESTING: root
|
||||
DB_PASSWORD_TESTING:
|
||||
ports:
|
||||
- 8080:80
|
||||
links:
|
||||
- mysql
|
||||
depends_on:
|
||||
- mysql
|
||||
|
||||
front:
|
||||
image: numerisisep/numeris-front
|
||||
container_name: numeris_front
|
||||
restart: unless-stopped
|
||||
build:
|
||||
context: ./front
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- 8000:80
|
||||
links:
|
||||
- back
|
||||
depends_on:
|
||||
- back
|
||||
@@ -50,8 +50,6 @@ services:
|
||||
- /home/numeris/node_modules
|
||||
links:
|
||||
- back
|
||||
expose:
|
||||
- ${FRONT_PORT}
|
||||
ports:
|
||||
- ${FRONT_PORT}:${FRONT_PORT}
|
||||
command: ng s --host 0.0.0.0
|
||||
|
||||
+5
-6
@@ -1,10 +1,9 @@
|
||||
FROM node:11.15.0 as builder
|
||||
WORKDIR /opt/numeris
|
||||
ENV PATH /opt/numeris/node_modules/.bin:$PATH
|
||||
COPY package*.json /opt/numeris/
|
||||
RUN npm ci
|
||||
RUN npm install -g @angular/cli@7.3.9
|
||||
COPY package.json yarn.lock /opt/numeris/
|
||||
RUN yarn install
|
||||
# RUN yarn add -g @angular/cli@7.3.9
|
||||
COPY . .
|
||||
RUN npm rebuild node-sass
|
||||
RUN npm run build
|
||||
ENTRYPOINT [ "ng", "serve", "--configuration", "production", "--port", "80"]
|
||||
RUN yarn run build-prod
|
||||
ENTRYPOINT [ "ng", "serve", "--port", "80" ]
|
||||
|
||||
+11
-21
@@ -1,24 +1,14 @@
|
||||
server {
|
||||
listen 80;
|
||||
sendfile on;
|
||||
default_type application/octet-stream;
|
||||
gzip on;
|
||||
gzip_http_version 1.1;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
gzip_min_length 1100;
|
||||
gzip_vary on;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
gzip_comp_level 9;
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/javascript;
|
||||
gzip_proxied no-cache no-store private expired auth;
|
||||
gzip_min_length 1000;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
proxy_pass http://api.numeris-isep.fr;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
listen 80;
|
||||
server_name 0.0.0.0;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user