-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit, project generated with yo from template
- Loading branch information
0 parents
commit ab993c2
Showing
29 changed files
with
21,007 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Atom Mail 2019 Alex Karetnikov | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3.6' | ||
services: | ||
frontend: | ||
build: | ||
context: . | ||
dockerfile: ./docker/frontend/dockerfile-prod | ||
volumes: | ||
- ./.caddy:/root/.caddy # to save certificates on disk | ||
- ./docker/frontend/Caddyfile:/etc/Caddyfile # to mount custom Caddyfile | ||
ports: | ||
- "2015:2015" | ||
- "80:80" | ||
- "443:443" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Default compose file for development. | ||
# Should be used directly in development. | ||
|
||
version: "3.6" | ||
services: | ||
frontend: | ||
build: | ||
context: . | ||
dockerfile: ./docker/frontend/Dockerfile | ||
args: | ||
NODE_ENV: "development" | ||
command: npm start | ||
volumes: | ||
- .:/code | ||
- /code/node_modules | ||
ports: | ||
- "3000:3000" | ||
networks: | ||
- webnet | ||
environment: | ||
HOST: "0.0.0.0" | ||
|
||
networks: | ||
webnet: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
0.0.0.0:80 | ||
root /www | ||
header / { | ||
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" | ||
X-Xss-Protection "1; mode=block" | ||
X-Content-Type-Options "nosniff" | ||
X-Frame-Options "DENY" | ||
Content-Security-Policy "upgrade-insecure-requests" | ||
Referrer-Policy "strict-origin-when-cross-origin" | ||
Cache-Control "public, max-age=15, must-revalidate" | ||
Feature-Policy "accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'self'; camera 'none'; encrypted-media 'none'; fullscreen 'self'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture *; speaker 'none'; sync-xhr 'none'; usb 'none'; vr 'none'" | ||
} | ||
|
||
gzip { | ||
level 9 | ||
} | ||
|
||
log stdout | ||
errors stdout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM node:alpine | ||
|
||
ARG NODE_ENV | ||
ENV NODE_ENV "$NODE_ENV" | ||
|
||
# System deps: | ||
|
||
RUN npm --version && apk add --no-cache \ | ||
autoconf \ | ||
automake \ | ||
bash \ | ||
build-base \ | ||
ca-certificates \ | ||
curl \ | ||
file \ | ||
g++ \ | ||
gcc \ | ||
git \ | ||
lcms2-dev \ | ||
libjpeg-turbo-dev \ | ||
libpng-dev \ | ||
make \ | ||
nasm \ | ||
wget \ | ||
zlib-dev | ||
|
||
|
||
# Installing dependencies: | ||
WORKDIR /code | ||
COPY package.json package-lock.json /code/ | ||
|
||
# We do not need to tweak this command, `$NODE_ENV` does it for us. | ||
RUN npm install | ||
|
||
|
||
# Creating folders, and files for a project: | ||
COPY . /code | ||
|
||
|
||
# Project initialization: | ||
EXPOSE 4000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from node:alpine as build-stage | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json package* ./ | ||
RUN npm i | ||
COPY . ./ | ||
RUN npm run build | ||
|
||
from abiosoft/caddy | ||
COPY --from=build-stage /app/build /www | ||
COPY docker/frontend/Caddyfile /etc/Caddyfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Configuring Jest | ||
// See: https://facebook.github.io/jest/docs/en/configuration.html | ||
|
||
module.exports = { | ||
// without this line rootDir will be `./tests` | ||
// 'rootDir': '..', | ||
|
||
'moduleFileExtensions': [ | ||
'js', | ||
'jsx', | ||
'json', | ||
], | ||
'transform': { | ||
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2|svg|svg\\?inline)$': | ||
'jest-transform-stub', | ||
'^.+\\.jsx?$': 'babel-jest' | ||
}, | ||
'moduleNameMapper': { | ||
'^~/(.*)$': '<rootDir>/client/$1', | ||
'^@/(.*)$': '<rootDir>/tests/$1', | ||
}, | ||
'testPathIgnorePatterns': [ | ||
'/node_modules/', | ||
'/docker/', | ||
], | ||
|
||
'collectCoverage': true, | ||
'coverageThreshold': { | ||
'global': { | ||
'branches': 40, | ||
'functions': 40, | ||
'lines': 40, | ||
'statements': 50 | ||
}, | ||
}, | ||
'coveragePathIgnorePatterns': [ | ||
'/node_modules/', | ||
'/tests/', | ||
], | ||
'verbose': true, | ||
} |
Oops, something went wrong.