Compare commits

..
Author SHA1 Message Date
marc f49ea9b824 open to everyone
Docker build test / build-back (push) Canceled after 0s
Docker build test / build-front (push) Canceled after 0s
2022-10-26 16:46:50 +02:00
marc c97ba0e12e testing dockerfile with yarn now 2022-10-26 16:38:39 +02:00
marc 39043271db fuck dependencies 2022-10-26 16:33:28 +02:00
marc e85d62a211 trying full link 2022-10-26 06:53:41 +02:00
marc a3d1a9fc82 makes no sense 2022-10-26 06:51:59 +02:00
marc b8e59fd5a0 add vs set 2022-10-26 06:48:48 +02:00
marc 04f47471cb fuck cors 2022-10-26 06:45:34 +02:00
marc fd0dbdc01b case is good 2022-10-26 06:43:19 +02:00
marc 2872d48f1c trying without force 2022-10-26 06:32:06 +02:00
marc 3e0fbce2c4 let cache alone 2022-10-26 06:29:07 +02:00
marc 70d68872bd why would i do that 2022-10-26 06:23:26 +02:00
marc 3cd91ed30f change 2022-10-26 06:18:27 +02:00
marc 9009cc8a5e fuck seed 2022-10-26 06:17:08 +02:00
marc 85e1ca3bc0 move header
Docker build test / build-back (push) Canceled after 0s
Docker build test / build-front (push) Canceled after 0s
2022-10-21 22:31:44 +02:00
marc 88492056a8 fix 2022-10-21 22:23:29 +02:00
marc c3689ceb83 test 2022-10-21 22:21:15 +02:00
marc 9fb724d72f change place 2022-10-21 22:17:56 +02:00
marc a3fbd43a33 cors numeris.conf 2022-10-21 22:15:07 +02:00
marc 2d231d4e03 bye http 2022-10-21 22:04:05 +02:00
marc 441b693bd3 bye events 2022-10-21 20:24:23 +02:00
marc b71e0dfba1 new nginx conf 2022-10-21 19:54:20 +02:00
marc 570b5c6fb5 bye angular cli
Docker build test / build-back (push) Canceled after 0s
Docker build test / build-front (push) Canceled after 0s
2022-10-21 19:44:31 +02:00
marc d361c16d79 yarn.lock 2022-10-21 19:37:44 +02:00
marc ce3a61a47d bye 2022-10-21 19:21:47 +02:00
marc d48a538719 bye useless dependency 2022-10-17 07:04:58 +02:00
marc f73c0155a0 port 80 2022-10-17 07:04:31 +02:00
marc d66f162805 conf prod 2022-10-17 07:02:33 +02:00
marc 15794021c8 serve 2022-10-17 07:01:42 +02:00
marc 9657125ea0 port 80 2022-10-17 07:01:13 +02:00
marc a09792cd5b Merge branch 'github-action' into fix-numeris 2022-10-17 06:40:30 +02:00
marc 5e9a7ccf82 needs
Docker build test / build-back (push) Canceled after 0s
Docker build test / build-front (push) Canceled after 0s
2022-10-17 06:40:23 +02:00
marc 412a8ccdcf Revert "needs"
This reverts commit b466e5b6ee.
2022-10-17 06:40:00 +02:00
marc b466e5b6ee needs 2022-10-17 06:39:49 +02:00
marc 2c6146bfbb Merge branch 'github-action' into fix-numeris 2022-10-17 06:38:54 +02:00
marc 91fa5c4f5a pull and recreate job 2022-10-17 06:38:46 +02:00
marc 4a3ffdfc0d fix dumb mistake 2022-10-17 06:31:44 +02:00
marc 02ff859c54 build front and back at the same time 2022-10-17 06:31:11 +02:00
marc 0767f8b5d9 ignore dockerfile in container 2022-10-17 06:27:36 +02:00
marc 82c0490780 serve production front 2022-10-17 06:27:04 +02:00
marc 13f023260b Revert "not clearing config"
This reverts commit eac0beaba4.
2022-10-17 06:17:00 +02:00
marc eac0beaba4 not clearing config 2022-10-17 06:15:44 +02:00
marc b3831d4678 have to clear cache and config 2022-10-17 06:02:37 +02:00
marc dd3fd2da68 .env is mounted 2022-10-17 05:43:47 +02:00
marc 8a6b1bc618 verbose 2022-10-12 14:54:40 +02:00
marc e5d018989a Merge branch 'dockerignore' into fix-numeris 2022-10-12 14:36:31 +02:00
marc 2e1528dd1f ok 2022-10-12 14:36:19 +02:00
marc a1c43017d9 Merge branch 'dockerignore' into fix-numeris 2022-10-12 10:55:49 +02:00
marc 46f79cbe9f pls ignore .env files 2022-10-12 10:55:41 +02:00
marc 27f537c430 it's all cool man 2022-10-12 10:30:54 +02:00
marc d61048c285 Merge branch 'dockerfile-production' into fix-numeris 2022-10-12 10:02:11 +02:00
marc 8cc34542e1 Merge branch 'fix-dockerhub' into fix-numeris 2022-10-12 10:01:20 +02:00
marc 3d488c4b93 numerisisep
Docker build test / build-back (push) Canceled after 0s
Docker build test / build-front (push) Canceled after 0s
2022-10-12 10:00:55 +02:00
marc 0a5083fcff Dockerfile.production twice yess 2022-10-12 09:43:59 +02:00
marc 7c52bf2e14 build but not for prod 2022-10-12 09:43:23 +02:00
marc 1656c1ddfe bye useless stuff 2022-10-12 09:30:05 +02:00
marc 71de68a9f2 Dockerfile.production 2022-10-12 09:24:17 +02:00
marc 620a8b9a1b dumb mistake 2022-10-12 06:39:07 +02:00
marc e4b6664eb7 Merge branch 'github-action' into fix-numeris 2022-10-12 05:44:01 +02:00
marc 49964d06b3 build front then back 2022-10-12 05:43:40 +02:00
marc 9357a27076 Merge branch 'fix-nginx' into fix-numeris 2022-10-12 05:39:33 +02:00
marc 54a3be8b47 Revert "connection upgrade"
Docker build test / build-back (push) Canceled after 0s
Docker build test / build-front (push) Canceled after 0s
This reverts commit 86527485a9.
2022-10-12 05:39:21 +02:00
marc 3dacb83815 Merge branch 'fix-dockerhub' into fix-numeris 2022-10-12 05:37:13 +02:00
marc 8137b34aef fix double networks 2022-10-12 05:37:06 +02:00
marc 0c84e17f8b fix dockerhub 2022-10-12 05:36:49 +02:00
marc 86527485a9 connection upgrade 2022-10-12 05:29:18 +02:00
marc cc37495dd6 fix-nginx 2022-10-12 05:27:59 +02:00
15 changed files with 9072 additions and 12910 deletions
+2 -1
View File
@@ -4,7 +4,8 @@
.vscode
.DS_Store
docker-compose*.yml
.env*
.env
.env.template
# Back
back/.DS_Store
+52 -3
View File
@@ -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
View File
@@ -2,3 +2,5 @@
vendor
public/storage
public/build
.env
.env.template
+5 -1
View File
@@ -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
+3
View File
@@ -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
View File
@@ -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
+6 -6
View File
@@ -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}}"
+2 -4
View File
@@ -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
View File
@@ -1,3 +1,4 @@
.DS_Store
node_modules/
dist/
Dockerfile
+6 -13
View File
@@ -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", "--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;"]
RUN yarn run build-prod
ENTRYPOINT [ "ng", "serve", "--configuration", "production", "--port", "80", "--host", "0.0.0.0" ]
+17
View File
@@ -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
View File
@@ -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;
}
}
-12862
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff