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
marc 8b2df44fc3 wrong place 2022-10-06 23:28:07 +02:00
marc 47078b0d9c bypass cors for now 2022-10-06 23:23:45 +02:00
marc df412eb512 s 2022-10-04 15:29:36 +02:00
marc a3ae179ad6 db 2022-10-04 15:28:25 +02:00
marc 5c7b20e374 clean docker-compose.yml 2022-10-04 15:26:24 +02:00
marc 093d45a679 caddy ingress net 2022-10-04 15:08:50 +02:00
marc 5a73a82eed fix ports 2022-10-03 20:25:51 +02:00
marc 84c5fca9ae Merge branch 'docker-compose' into fix-numeris 2022-10-03 20:23:41 +02:00
marc 7d86256821 Merge branch 'docker-compose' into fix-numeris 2022-10-03 20:21:54 +02:00
marc 900eeb79cc Merge branch 'docker-compose' into fix-numeris 2022-10-03 20:19:13 +02:00
marc c8139e01d6 Merge branch 'docker-compose' into fix-numeris 2022-10-03 20:16:41 +02:00
marc 9fc3242be7 Merge branch 'docker-compose' into fix-numeris 2022-10-03 19:45:50 +02:00
marc ad48ee11ee fix conflict 2022-10-03 19:41:29 +02:00
marc 861551f209 Merge branch 'dockerignore' into fix-numeris 2022-09-28 16:45:22 +02:00
marc 4942daea62 all env files 2022-09-28 16:32:39 +02:00
marc c7aaebf8a1 Merge branch 'dockerignore' into fix-numeris 2022-09-28 16:30:13 +02:00
marc 0cf2367cbe ignoring env file when building image 2022-09-28 16:30:05 +02:00
marc 1c4789a4a9 Merge branch 'php7.4' into fix-numeris 2022-09-24 20:11:17 +02:00
marc eaea9577ea home is back instead of opt 2022-09-24 20:11:10 +02:00
marc da3f2fdb1b Merge branch 'php7.4' into fix-numeris 2022-09-21 16:49:30 +02:00
marc ca176b628a entrypoint for prod is a must 2022-09-21 16:49:20 +02:00
marc 85cd2b8d5e Merge branch 'docker-compose' into fix-numeris 2022-09-21 16:48:36 +02:00
marc 813056db7e Merge branch 'php7.4' into fix-numeris 2022-09-21 16:41:19 +02:00
marc fc7a469181 apache2-foreground 2022-09-21 16:40:56 +02:00
marc a3090ae8de Merge branch 'docker-compose' into fix-numeris 2022-09-21 16:35:00 +02:00
marc 0ba9918b75 restart unless-stopped in testing 2022-09-21 16:34:33 +02:00
marc 089113fe16 Merge branch 'php7.4' into fix-numeris 2022-09-21 16:30:46 +02:00
marc decd443031 rip exec 2022-09-21 16:30:23 +02:00
marc e7d31e8397 Merge branch 'front-multistage' into fix-numeris-front-multistage
Docker build test / build-back (push) Canceled after 0s
Docker build test / build-front (push) Canceled after 0s
2022-09-21 16:25:53 +02:00
marc 80aa16c844 new ports 2022-09-21 16:25:45 +02:00
marc a2d679457d Merge branch 'front-multistage' into fix-numeris-front-multistage 2022-09-21 16:22:44 +02:00
marc 51eeb3d000 Merge remote-tracking branch 'origin/docker-compose' into front-multistage 2022-09-21 16:20:32 +02:00
marc ec7e146e6d Merge branch 'front-multistage' into fix-numeris-front-multistage 2022-09-21 11:03:35 +02:00
marc 08f70a7a61 ci 2022-09-21 11:03:09 +02:00
marc df196720b8 Merge branch 'front-multistage' into fix-numeris-front-multistage 2022-09-21 10:41:04 +02:00
marc e844eafd41 opt/numeris 2022-09-21 10:40:50 +02:00
marc b22b25f386 nginx.conf 2022-09-21 10:38:00 +02:00
marc bde444a55a nginx 2022-09-21 10:38:00 +02:00
marc def2fc0335 nginx.conf 2022-09-21 10:37:25 +02:00
marc ec4a85ecbe nginx 2022-09-21 10:36:47 +02:00
marc f44662e487 Merge branch 'front-multistage' into fix-numeris-front-multistage 2022-09-21 10:32:53 +02:00
marc 694f0b0d25 multistage 2022-09-21 10:32:33 +02:00
marc 19b6f3031e Merge branch 'caddy' into fix-numeris 2022-09-21 01:27:59 +02:00
marc 8095851fb9 typo 2022-09-21 01:23:49 +02:00
marc a926746659 Merge branch 'caddy' into fix-numeris 2022-09-21 01:09:22 +02:00
marc f18008507d caddy network 2022-09-21 01:09:12 +02:00
marc 427d23362b Merge branch 'caddy' into fix-numeris 2022-09-21 01:01:13 +02:00
marc 7a90266be6 caddy container joins the party 2022-09-21 01:00:32 +02:00
marc b1e1f4d65e Merge branch 'docker-compose' into fix-numeris 2022-09-20 16:12:15 +02:00
marc 1e0f5207b2 Merge branch 'docker-compose' into fix-numeris 2022-09-20 15:44:56 +02:00
marc 4665aa40db Merge branch 'php7.4' into fix-numeris 2022-09-20 15:39:08 +02:00
marc 6ee3e34d0c forcing every command 2022-09-20 15:38:58 +02:00
marc 5eb82ae8b7 Merge branch 'php7.4' into fix-numeris 2022-09-20 15:37:44 +02:00
marc d2ca350fd4 executable 2022-09-20 15:37:34 +02:00
marc 744f963046 Merge branch 'php7.4' into fix-numeris 2022-09-20 15:36:06 +02:00
marc ddf8132963 absolute path 2022-09-20 15:35:54 +02:00
marc ccf5d87a7c Merge branch 'php7.4' into fix-numeris 2022-09-20 15:34:04 +02:00
marc 7e14892de1 overloading entrypoint 2022-09-20 15:33:56 +02:00
marc 910fb9766b Merge branch 'docker-compose' into fix-numeris 2022-09-20 15:18:56 +02:00
marc c5307c8574 Merge branch 'docker-compose' into fix-numeris 2022-09-20 14:36:39 +02:00
marc 278fea29b7 Merge branch 'github-action' into fix-numeris 2022-09-19 11:00:16 +02:00
marc 4ad3c839e2 Merge branch 'docker-compose' into fix-numeris 2022-09-19 10:59:47 +02:00
marc 93732c9fd1 Merge branch 'front' into fix-numeris 2022-09-19 10:59:43 +02:00
marc 6533ab3b30 entrypoint is front is a must 2022-09-19 10:59:19 +02:00
marc fb944657b5 dockerfile 2022-09-19 10:57:56 +02:00
marc d4804bd214 touch .env 2022-09-16 19:47:47 +02:00
marc 897880c9f0 run every week to test the image resilience over external package changes 2022-09-16 19:44:37 +02:00
marc be946356ae build back and front 2022-09-16 19:37:09 +02:00
marc fea17b735c docker build test 2022-09-16 19:33:58 +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 3301654cb7 fake .env 2022-09-16 19:09:32 +02:00
marc a98a4ca05a master only 2022-09-16 19:08:03 +02:00
marc b317fd82b3 Merge branch 'docker-compose' into github-action 2022-09-16 19:07:13 +02:00
marc 3b18e4dd36 2 github actions 2022-09-16 18:59:09 +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
18 changed files with 11544 additions and 13790 deletions
+3 -1
View File
@@ -4,6 +4,8 @@
.vscode
.DS_Store
docker-compose*.yml
.env
.env.template
# Back
back/.DS_Store
@@ -17,4 +19,4 @@ var
# Front
front/.DS_Store
front/node_modules/
front/dist/
front/dist/
+48
View File
@@ -0,0 +1,48 @@
name: Docker build test
on:
push:
branches:
- "*"
- "!master"
# Publish `v1.2.3` tags as releases.
tags:
- v*
# Run tests for any PRs.
pull_request:
jobs:
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: Fake env file
run: touch .env
- name: Build
run: docker-compose -f docker-compose.production.yml build back
build-front:
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 front
+89
View File
@@ -0,0 +1,89 @@
name: Docker
on:
schedule:
- cron: "0 4 * * 0" # run every sunday at 4 am to test if the image builds correctly given that changes of debian or compose packages can break the image
push:
branches:
- "master"
# Publish `v1.2.3` tags as releases.
tags:
- v*
# Run tests for any PRs.
pull_request:
jobs:
build-front:
name: Build front
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 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: 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
+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" ]
+12 -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
@@ -16,25 +15,28 @@ 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
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
+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>
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env sh
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
+17 -5
View File
@@ -7,6 +7,8 @@ services:
restart: unless-stopped
ports:
- 3000:80
links:
- mysql:db
depends_on:
- mysql
networks:
@@ -28,6 +30,7 @@ services:
- ./var/mysql:/var/lib/mysql
back:
image: numerisisep/numeris-back
container_name: numeris_back
restart: unless-stopped
build:
@@ -38,25 +41,33 @@ services:
- mysql
env_file:
- .env
volumes:
- .env:/home/numeris/.env
depends_on:
- mysql
- mysql
labels:
caddy: api.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
dockerfile: Dockerfile.production
networks:
- caddy
depends_on:
- back
labels:
caddy: numeris-isep.fr
caddy.reverse_proxy: "{{upstreams 4200}}"
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"
@@ -75,4 +86,5 @@ networks:
mysql:
volumes:
caddy_data:
mysql:
+7 -5
View File
@@ -4,6 +4,7 @@ services:
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: numeris_phpmyadmin
restart: unless-stopped
ports:
- 3000:80
links:
@@ -16,13 +17,15 @@ services:
mysql:
image: mysql:5.7
container_name: numeris_mysql
restart: unless-stopped
environment:
MYSQL_DATABASE: 'numeris_testing'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
back:
image: numeris-back
image: numerisisep/numeris-back
container_name: numeris_back
restart: unless-stopped
build:
context: ./back
dockerfile: Dockerfile
@@ -41,14 +44,13 @@ services:
- mysql
front:
image: numeris-front
image: numerisisep/numeris-front
container_name: numeris_front
restart: unless-stopped
build:
context: ./front
dockerfile: Dockerfile
ports:
- 4200:4200
- 8000:80
links:
- back
depends_on:
- back
+1
View File
@@ -1,3 +1,4 @@
.DS_Store
node_modules/
dist/
Dockerfile
+10 -18
View File
@@ -1,18 +1,10 @@
FROM node:11.15.0
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 . /home/numeris
RUN npm rebuild node-sass
WORKDIR /home/numeris
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", "--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;"]
+14
View File
@@ -0,0 +1,14 @@
server {
gzip on;
gzip_types text/plain text/css application/javascript;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
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