Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #19

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

Main #19

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM nginx:alpine

RUN chown -R nginx:nginx /var/log/nginx \
&& chown -R nginx:nginx /etc/nginx/nginx.conf


COPY nginx.conf /etc/nginx/nginx.conf
COPY ./angular/dist/angular-starter /var/www/html


EXPOSE 80
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,4 @@ Here is a step by step Tutorial : https://www.ganatan.com/tutorials/getting-sta
- Installation - https://www.ganatan.com/tutorials/demarrer-avec-angular
- Tutoriels Etape par étape - https://www.ganatan.com/tutorials

"# angular-react-starter-ex"
3 changes: 2 additions & 1 deletion angular/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
}
},
"cli": {
"defaultCollection": "@angular-eslint/schematics"
"defaultCollection": "@angular-eslint/schematics",
"analytics": "74d2ecca-b905-4459-b7d8-89e9b09546c8"
}
}
6 changes: 3 additions & 3 deletions angular/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
user www-data;
user nobody;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
Expand Down Expand Up @@ -27,8 +27,8 @@ http {
include /etc/nginx/conf.d/*.conf;

server {
listen 80 default_server;
listen [::]:80 default_server;
listen 8080 default_server;
listen [::]:8080 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;

Expand Down
44 changes: 44 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
user nginx;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
}

http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

gzip on;

include /etc/nginx/conf.d/*.conf;

server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;

server_name _;

location / {
try_files $uri $uri/ =404;
}

}

}