Compare commits
66
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f49ea9b824 | ||
|
|
c97ba0e12e | ||
|
|
39043271db | ||
|
|
e85d62a211 | ||
|
|
a3d1a9fc82 | ||
|
|
b8e59fd5a0 | ||
|
|
04f47471cb | ||
|
|
fd0dbdc01b | ||
|
|
2872d48f1c | ||
|
|
3e0fbce2c4 | ||
|
|
70d68872bd | ||
|
|
3cd91ed30f | ||
|
|
9009cc8a5e | ||
|
|
85e1ca3bc0 | ||
|
|
88492056a8 | ||
|
|
c3689ceb83 | ||
|
|
9fb724d72f | ||
|
|
a3fbd43a33 | ||
|
|
2d231d4e03 | ||
|
|
441b693bd3 | ||
|
|
b71e0dfba1 | ||
|
|
570b5c6fb5 | ||
|
|
d361c16d79 | ||
|
|
ce3a61a47d | ||
|
|
d48a538719 | ||
|
|
f73c0155a0 | ||
|
|
d66f162805 | ||
|
|
15794021c8 | ||
|
|
9657125ea0 | ||
|
|
a09792cd5b | ||
|
|
5e9a7ccf82 | ||
|
|
412a8ccdcf | ||
|
|
b466e5b6ee | ||
|
|
2c6146bfbb | ||
|
|
91fa5c4f5a | ||
|
|
4a3ffdfc0d | ||
|
|
02ff859c54 | ||
|
|
0767f8b5d9 | ||
|
|
82c0490780 | ||
|
|
13f023260b | ||
|
|
eac0beaba4 | ||
|
|
b3831d4678 | ||
|
|
dd3fd2da68 | ||
|
|
8a6b1bc618 | ||
|
|
e5d018989a | ||
|
|
2e1528dd1f | ||
|
|
a1c43017d9 | ||
|
|
46f79cbe9f | ||
|
|
27f537c430 | ||
|
|
d61048c285 | ||
|
|
8cc34542e1 | ||
|
|
3d488c4b93 | ||
|
|
0a5083fcff | ||
|
|
7c52bf2e14 | ||
|
|
1656c1ddfe | ||
|
|
71de68a9f2 | ||
|
|
620a8b9a1b | ||
|
|
e4b6664eb7 | ||
|
|
49964d06b3 | ||
|
|
9357a27076 | ||
|
|
54a3be8b47 | ||
|
|
3dacb83815 | ||
|
|
8137b34aef | ||
|
|
0c84e17f8b | ||
|
|
86527485a9 | ||
|
|
cc37495dd6 |
+2
-1
@@ -4,7 +4,8 @@
|
||||
.vscode
|
||||
.DS_Store
|
||||
docker-compose*.yml
|
||||
.env*
|
||||
.env
|
||||
.env.template
|
||||
|
||||
# Back
|
||||
back/.DS_Store
|
||||
|
||||
@@ -14,7 +14,8 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-front:
|
||||
name: Build front
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -31,10 +32,58 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker images
|
||||
- name: Build and push front
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: front
|
||||
dockerfile: Dockerfile
|
||||
push: true
|
||||
tags: numerisisep/numeris-front:latest
|
||||
|
||||
build-back:
|
||||
name: Build back
|
||||
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 back
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: back
|
||||
dockerfile: Dockerfile.production
|
||||
push: true
|
||||
tags: marcpartensky/numeris-back:latest
|
||||
tags: numerisisep/numeris-back:latest
|
||||
|
||||
|
||||
pull-and-recreate:
|
||||
name: Pull and recreate
|
||||
needs:
|
||||
- build-front
|
||||
- build-back
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: executing remote ssh commands using password
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
# password: ${{ secrets.PASSWORD }}
|
||||
key: ${{ secrets.KEY }}
|
||||
port: ${{ secrets.PORT }}
|
||||
script: |
|
||||
cd numeris
|
||||
git pull
|
||||
docker-compose -f docker-compose.production.yml pull
|
||||
docker-compose -f docker-compose.production.yml up -d --force-recreate
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
vendor
|
||||
public/storage
|
||||
public/build
|
||||
.env
|
||||
.env.template
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
# 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>
|
||||
|
||||
+7
-3
@@ -1,8 +1,12 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
php artisan key:generate --force
|
||||
php artisan jwt:secret --force
|
||||
php artisan migrate:refresh --seed --force
|
||||
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
|
||||
|
||||
docker-php-entrypoint
|
||||
apache2-foreground
|
||||
|
||||
@@ -30,6 +30,7 @@ services:
|
||||
- ./var/mysql:/var/lib/mysql
|
||||
|
||||
back:
|
||||
image: numerisisep/numeris-back
|
||||
container_name: numeris_back
|
||||
restart: unless-stopped
|
||||
build:
|
||||
@@ -40,24 +41,23 @@ services:
|
||||
- mysql
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- .env:/home/numeris/.env
|
||||
depends_on:
|
||||
- mysql
|
||||
networks:
|
||||
- caddy
|
||||
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
|
||||
container_name: numeris_front
|
||||
build:
|
||||
context: ./front
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: Dockerfile.production
|
||||
networks:
|
||||
- caddy
|
||||
depends_on:
|
||||
- back
|
||||
labels:
|
||||
caddy: numeris-isep.fr
|
||||
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
|
||||
|
||||
back:
|
||||
image: numeris-back
|
||||
image: numerisisep/numeris-back
|
||||
container_name: numeris_back
|
||||
restart: unless-stopped
|
||||
build:
|
||||
@@ -44,7 +44,7 @@ services:
|
||||
- mysql
|
||||
|
||||
front:
|
||||
image: numeris-front
|
||||
image: numerisisep/numeris-front
|
||||
container_name: numeris_front
|
||||
restart: unless-stopped
|
||||
build:
|
||||
@@ -54,5 +54,3 @@ services:
|
||||
- 8000:80
|
||||
links:
|
||||
- back
|
||||
depends_on:
|
||||
- back
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
Dockerfile
|
||||
|
||||
+6
-13
@@ -1,17 +1,10 @@
|
||||
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 /opt/numeris/
|
||||
COPY 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-prod
|
||||
ENTRYPOINT [ "ng", "s", "--host", "0.0.0.0" ]
|
||||
|
||||
FROM nginx
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
COPY --from=builder /opt/numeris/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
||||
RUN yarn run build-prod
|
||||
ENTRYPOINT [ "ng", "serve", "--configuration", "production", "--port", "80", "--host", "0.0.0.0" ]
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
FROM node:11.15.0 as builder
|
||||
WORKDIR /opt/numeris
|
||||
ENV PATH /opt/numeris/node_modules/.bin:$PATH
|
||||
COPY package.json /opt/numeris/
|
||||
COPY yarn.lock /opt/numeris/
|
||||
RUN yarn install
|
||||
# RUN yarn add -g @angular/cli@7.3.9
|
||||
COPY . .
|
||||
RUN yarn run build-prod
|
||||
ENTRYPOINT [ "ng", "serve", "--configuration", "production", "--port", "80" ]
|
||||
|
||||
FROM nginx
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
COPY --from=builder /opt/numeris/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
||||
+11
-16
@@ -1,19 +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;
|
||||
}
|
||||
listen 80;
|
||||
server_name 0.0.0.0;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
-12862
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -60,6 +60,6 @@
|
||||
"protractor": "~5.4.2",
|
||||
"ts-node": "~8.0.3",
|
||||
"tslint": "~5.14.0",
|
||||
"typescript": "^3.2.4"
|
||||
"typescript": "3.1.1"
|
||||
}
|
||||
}
|
||||
|
||||
+8957
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user