Compare commits
105
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c0ce828ca | ||
|
|
d360d2e836 | ||
|
|
c533e5191c | ||
|
|
156bb5d014 | ||
|
|
1dfe522791 | ||
|
|
fd46fdef0a | ||
|
|
56d511e791 | ||
|
|
3cfa7743c5 | ||
|
|
c880533753 | ||
|
|
3748e75ee3 | ||
|
|
d3aea22fe0 | ||
|
|
092347558a | ||
|
|
5a73a82eed | ||
|
|
84c5fca9ae | ||
|
|
09f6858326 | ||
|
|
7d86256821 | ||
|
|
6d3fc1b774 | ||
|
|
900eeb79cc | ||
|
|
326cce6fd8 | ||
|
|
c8139e01d6 | ||
|
|
1f9a0b1bb9 | ||
|
|
9fc3242be7 | ||
|
|
4d6fe9941b | ||
|
|
ad48ee11ee | ||
|
|
418de3d52d | ||
|
|
861551f209 | ||
|
|
4942daea62 | ||
|
|
c7aaebf8a1 | ||
|
|
0cf2367cbe | ||
|
|
1c4789a4a9 | ||
|
|
eaea9577ea | ||
|
|
da3f2fdb1b | ||
|
|
ca176b628a | ||
|
|
85cd2b8d5e | ||
|
|
b7c51c7f3c | ||
|
|
813056db7e | ||
|
|
fc7a469181 | ||
|
|
a3090ae8de | ||
|
|
0ba9918b75 | ||
|
|
089113fe16 | ||
|
|
decd443031 | ||
|
|
e7d31e8397 | ||
|
|
80aa16c844 | ||
|
|
a2d679457d | ||
|
|
51eeb3d000 | ||
|
|
ec7e146e6d | ||
|
|
08f70a7a61 | ||
|
|
df196720b8 | ||
|
|
e844eafd41 | ||
|
|
b22b25f386 | ||
|
|
bde444a55a | ||
|
|
def2fc0335 | ||
|
|
ec4a85ecbe | ||
|
|
f44662e487 | ||
|
|
694f0b0d25 | ||
|
|
19b6f3031e | ||
|
|
8095851fb9 | ||
|
|
a926746659 | ||
|
|
f18008507d | ||
|
|
427d23362b | ||
|
|
7a90266be6 | ||
|
|
b1e1f4d65e | ||
|
|
6c60e3792c | ||
|
|
1e0f5207b2 | ||
|
|
140fb1d7d8 | ||
|
|
4665aa40db | ||
|
|
6ee3e34d0c | ||
|
|
5eb82ae8b7 | ||
|
|
d2ca350fd4 | ||
|
|
744f963046 | ||
|
|
ddf8132963 | ||
|
|
ccf5d87a7c | ||
|
|
7e14892de1 | ||
|
|
910fb9766b | ||
|
|
b54c69ae4c | ||
|
|
ce259181b9 | ||
|
|
c5307c8574 | ||
|
|
77ca1911ed | ||
|
|
278fea29b7 | ||
|
|
4ad3c839e2 | ||
|
|
93732c9fd1 | ||
|
|
6533ab3b30 | ||
|
|
fb944657b5 | ||
|
|
5e3dfec004 | ||
|
|
b834f1d27b | ||
|
|
3a374a10bc | ||
|
|
0378a0a224 | ||
|
|
d4804bd214 | ||
|
|
897880c9f0 | ||
|
|
be946356ae | ||
|
|
fea17b735c | ||
|
|
07dbb05443 | ||
|
|
d18074c556 | ||
|
|
3301654cb7 | ||
|
|
a98a4ca05a | ||
|
|
b317fd82b3 | ||
|
|
a6b9888cfe | ||
|
|
3b18e4dd36 | ||
|
|
6d40239a13 | ||
|
|
57fb4d7639 | ||
|
|
36ea133390 | ||
|
|
9f28d25eb7 | ||
|
|
8f69143715 | ||
|
|
739212ea0a | ||
|
|
c64058fff0 |
+1
-2
@@ -4,8 +4,7 @@
|
||||
.vscode
|
||||
.DS_Store
|
||||
docker-compose*.yml
|
||||
.env
|
||||
.env.template
|
||||
.env*
|
||||
|
||||
# Back
|
||||
back/.DS_Store
|
||||
|
||||
@@ -14,8 +14,7 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build-front:
|
||||
name: Build front
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -32,58 +31,10 @@ jobs:
|
||||
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
|
||||
- name: Build and push Docker images
|
||||
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
|
||||
tags: marcpartensky/numeris-back:latest
|
||||
|
||||
@@ -2,5 +2,3 @@
|
||||
vendor
|
||||
public/storage
|
||||
public/build
|
||||
.env
|
||||
.env.template
|
||||
|
||||
+1
-5
@@ -17,11 +17,7 @@ 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 headers && \
|
||||
a2enmod rewrite && \
|
||||
service apache2 restart
|
||||
RUN a2dissite 000-default.conf && a2ensite numeris.conf && a2enmod rewrite && service apache2 restart
|
||||
# Enable php conf
|
||||
COPY docker/php/php.ini /usr/local/etc/php/conf.d/default.ini
|
||||
|
||||
|
||||
@@ -15,11 +15,7 @@ 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 headers && \
|
||||
a2enmod rewrite && \
|
||||
service apache2 restart
|
||||
RUN a2dissite 000-default.conf && a2ensite numeris.conf && a2enmod rewrite && service apache2 restart
|
||||
# Enable php conf
|
||||
COPY docker/php/php.ini /usr/local/etc/php/conf.d/default.ini
|
||||
|
||||
|
||||
+3
-11
@@ -1,11 +1,7 @@
|
||||
{
|
||||
"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": [
|
||||
@@ -18,11 +14,6 @@
|
||||
"name": "MinhNam Nguyen",
|
||||
"email": "nguyen.minhnam@hotmail.fr",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Marc Partensky",
|
||||
"email": "marc@marcpartensky.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
@@ -60,7 +51,8 @@
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"dont-discover": []
|
||||
"dont-discover": [
|
||||
]
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -6,13 +6,10 @@
|
||||
# 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/error.log
|
||||
CustomLog /var/log/apache2/access.log combined
|
||||
ErrorLog /var/log/apache2/numeris-error.log
|
||||
CustomLog /var/log/apache2/numeris-access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
+3
-7
@@ -1,12 +1,8 @@
|
||||
#!/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
|
||||
php artisan key:generate --force
|
||||
php artisan jwt:secret --force
|
||||
php artisan migrate:refresh --seed --force
|
||||
|
||||
docker-php-entrypoint
|
||||
apache2-foreground
|
||||
|
||||
@@ -5,18 +5,19 @@ services:
|
||||
image: phpmyadmin/phpmyadmin:latest
|
||||
container_name: numeris_phpmyadmin
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 3000:80
|
||||
links:
|
||||
- mysql:db
|
||||
depends_on:
|
||||
- mysql
|
||||
networks:
|
||||
- caddy
|
||||
- traefik
|
||||
- mysql
|
||||
labels:
|
||||
caddy: phpmyadmin.numeris-isep.fr
|
||||
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.phpmyadmin.rule: Host(`phpmyadmin.numeris-isep.fr`)
|
||||
traefik.http.routers.phpmyadmin.entrypoints: websecure
|
||||
traefik.http.routers.phpmyadmin.tls.certresolver: zerossl
|
||||
traefik.http.services.phpmyadmin.loadbalancer.server.port: 80
|
||||
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
@@ -24,70 +25,95 @@ 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
|
||||
container_name: numeris_back
|
||||
restart: unless-stopped
|
||||
build:
|
||||
context: ./back
|
||||
dockerfile: Dockerfile.production
|
||||
networks:
|
||||
- caddy
|
||||
- traefik
|
||||
- mysql
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- .env:/home/numeris/.env
|
||||
depends_on:
|
||||
- mysql
|
||||
labels:
|
||||
caddy: api.numeris-isep.fr
|
||||
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||
# caddy.reverse_proxy.header_down: -Access-Control-Allow-Origin
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.back.rule: Host(`api.numeris-isep.fr`)
|
||||
traefik.http.routers.back.entrypoints: websecure
|
||||
traefik.http.routers.back.tls.certresolver: zerossl
|
||||
traefik.http.services.back.loadbalancer.server.port: 80
|
||||
|
||||
front:
|
||||
image: numerisisep/numeris-front
|
||||
container_name: numeris_front
|
||||
build:
|
||||
context: ./front
|
||||
dockerfile: Dockerfile.production
|
||||
dockerfile: Dockerfile
|
||||
networks:
|
||||
- caddy
|
||||
- traefik
|
||||
depends_on:
|
||||
- back
|
||||
labels:
|
||||
caddy: numeris-isep.fr
|
||||
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.front.rule: Host(`numeris-isep.fr`)
|
||||
traefik.http.routers.front.entrypoints: websecure
|
||||
traefik.http.routers.front.tls.certresolver: zerossl
|
||||
traefik.http.services.front.loadbalancer.server.port: 80
|
||||
|
||||
|
||||
caddy:
|
||||
image: lucaslorentz/caddy-docker-proxy:ci-alpine
|
||||
traefik:
|
||||
image: traefik
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
CADDY_INGRESS_NETWORKS: caddy
|
||||
command:
|
||||
# ## Provider Settings - https://docs.traefik.io/providers/docker/#provider-configuration ##
|
||||
# # - --providers.docker.exposedbydefault=false # <== Don't expose every container to traefik, only expose enabled ones
|
||||
# - --providers.file.filename=/dynamic.yaml # <== Referring to a dynamic configuration file
|
||||
- --providers.docker.network=web # <== Operate on the docker network named web
|
||||
- --providers.docker=true # <== Enabling docker as the provider for traefik
|
||||
# ## API Settings - https://docs.traefik.io/operations/api/, endpoints - https://docs.traefik.io/operations/api/#endpoints ##
|
||||
# - --api.insecure=false # <== Enabling insecure api, NOT RECOMMENDED FOR PRODUCTION
|
||||
- --api.dashboard=true
|
||||
- --api.debug=true # <== Enabling additional endpoints for debugging and profiling
|
||||
# ## Entrypoints Settings - https://docs.traefik.io/routing/entrypoints/#configuration ##
|
||||
- --entrypoints.web.address=:80
|
||||
- --entrypoints.websecure.address=:443
|
||||
# - --certificatesresolvers.tls.acme.email = support@numeris-isep.fr
|
||||
# - --certificatesresolvers.tls.acme.tlschallenge=true # <== Enable TLS-ALPN-01 to generate and renew ACME certs - --certificatesresolvers.tls.acme.email=marc.partensky@gmail.com
|
||||
# - --certificatesresolvers.tls.acme.storage=/letsencrypt/acme.json # Log Settings (options: ERROR, DEBUG, PANIC, FATAL, WARN, INFO) - https://docs.traefik.io/observability/logs/ ##
|
||||
- --certificatesresolvers.zerossl.acme.email=support@numeris-isep.fr
|
||||
- --certificatesresolvers.zerossl.acme.tlschallenge=true # <== Enable TLS-ALPN-01 to generate and renew ACME certs - --certificatesresolvers.tls.acme.email=marc.partensky@gmail.com
|
||||
- --certificatesresolvers.zerossl.acme.storage=/zerossl/acme.json # Log Settings (options: ERROR, DEBUG, PANIC, FATAL, WARN, INFO) - https://docs.traefik.io/observability/logs/ ##
|
||||
- --log.level=DEBUG # <== Setting the level of the logs from traefik
|
||||
- --entrypoints.web.http.redirections.entryPoint.to=websecure
|
||||
- --entrypoints.web.http.redirections.entryPoint.scheme=https
|
||||
- --entrypoints.web.http.redirections.entrypoint.permanent=true
|
||||
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"]
|
||||
- traefik
|
||||
volumes:
|
||||
# - ./traefik.yml:/traefik.yml # static configuration
|
||||
# - ./dynamic.yml:/dynamic.yml
|
||||
- traefik_letsencrypt:/letsencrypt
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.traefik.rule: Host(`traefik.numeris-isep.fr`)
|
||||
traefik.http.routers.traefik.service: api@internal
|
||||
traefik.http.routers.traefik.entrypoints: websecure
|
||||
traefik.http.routers.traefik.tls.certresolver: zerossl
|
||||
traefik.docker.network: traefik
|
||||
|
||||
networks:
|
||||
caddy:
|
||||
external: true
|
||||
traefik:
|
||||
mysql:
|
||||
|
||||
volumes:
|
||||
caddy_data:
|
||||
traefik_letsencrypt:
|
||||
mysql:
|
||||
|
||||
@@ -1,90 +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
|
||||
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:
|
||||
@@ -0,0 +1,58 @@
|
||||
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: 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: numeris-front
|
||||
container_name: numeris_front
|
||||
restart: unless-stopped
|
||||
build:
|
||||
context: ./front
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- 8000:80
|
||||
links:
|
||||
- back
|
||||
depends_on:
|
||||
- back
|
||||
@@ -50,6 +50,8 @@ services:
|
||||
- /home/numeris/node_modules
|
||||
links:
|
||||
- back
|
||||
expose:
|
||||
- ${FRONT_PORT}
|
||||
ports:
|
||||
- ${FRONT_PORT}:${FRONT_PORT}
|
||||
command: ng s --host 0.0.0.0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
Dockerfile
|
||||
|
||||
+13
-5
@@ -1,9 +1,17 @@
|
||||
FROM node:11.15.0 as builder
|
||||
WORKDIR /opt/numeris
|
||||
ENV PATH /opt/numeris/node_modules/.bin:$PATH
|
||||
COPY package.json yarn.lock /opt/numeris/
|
||||
RUN yarn install
|
||||
# RUN yarn add -g @angular/cli@7.3.9
|
||||
COPY package*.json /opt/numeris/
|
||||
RUN npm ci
|
||||
RUN npm install -g @angular/cli@7.3.9
|
||||
COPY . .
|
||||
RUN yarn run build-prod
|
||||
ENTRYPOINT [ "ng", "serve", "--port", "80" ]
|
||||
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;"]
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
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;"]
|
||||
+16
-11
@@ -1,14 +1,19 @@
|
||||
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;
|
||||
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;
|
||||
|
||||
listen 80;
|
||||
server_name 0.0.0.0;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
}
|
||||
|
||||
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.1.1"
|
||||
"typescript": "^3.2.4"
|
||||
}
|
||||
}
|
||||
|
||||
-8957
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user