1
0

chrone: sperate client and server to different repos.

This commit is contained in:
a.bouhuolia
2021-09-21 17:13:53 +02:00
parent e011b2a82b
commit 18df5530c7
10015 changed files with 17686 additions and 97524 deletions
View File
+68
View File
@@ -0,0 +1,68 @@
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br />
You will also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you cant go back!**
If you arent satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
### Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
### Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
### Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
### Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
### `npm run build` fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
-4
View File
@@ -1,4 +0,0 @@
node_modules
build
.env*
-11
View File
@@ -1,11 +0,0 @@
[ignore]
[include]
[libs]
[lints]
[options]
[strict]
-23
View File
@@ -1,23 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
-10
View File
@@ -1,10 +0,0 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"printWidth": 80,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 2,
"useTabs": false,
}
-68
View File
@@ -1,68 +0,0 @@
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br />
You will also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you cant go back!**
If you arent satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
### Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
### Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
### Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
### Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
### `npm run build` fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
-17658
View File
File diff suppressed because it is too large Load Diff
-41
View File
@@ -1,41 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules
jspm_packages
# Optional npm cache directory
.npm
# Optional REPL history
.node_repl_history
# Project Specific
data
./docker-compose.override.yml
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2016 Osedea
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-385
View File
@@ -1,385 +0,0 @@
![NoDock](https://raw.githubusercontent.com/Osedea/nodock/master/docs/images/logo.png)
Docker Compose for Node projects with Node, MySQL, MongoDB, NGINX, Memcached, Redis, Certbot and RabbitMQ images
![Node + Docker](https://raw.githubusercontent.com/Osedea/nodock/master/docs/images/nodock.jpg)
<a name="why-nodock"></a>
## Why NoDock?
The [docker Node.js](https://github.com/nodejs/docker-node) image is very simple, you give it an entrypoint and it runs it. This is fine for very simple/small scripts but for larger projects you'll probably want something a bit more robust.
The goal of NoDock is to provide a complete environment for your node project: Node.js service(s), databases, web servers, queues, etc. while doing the "wiring" for you.
You can use NoDock for simple projects by using one of the [examples](#Examples) or you can build upon them.
## Contents
- [Requirements](#Requirements)
- [Installation](#Installation)
- [Usage](#Usage)
- [Examples](#Examples)
- [Workspace](#Workspace)
- [HTTPS](#HTTPS)
- [Self-signed certificates](#SelfSigned)
- [Certbot](#Certbot)
- [Non-web project](#Non-Web)
- [Multiple Node containers](#Multi-Node)
- [More options](#More-Options)
- [Use Yarn](#Use-Yarn)
- [Change Node entrypoint](#Node-Entrypoint)
- [Change Node environment](#Node-Environment)
- [Change Node version](#Node-Version)
- [Change Node project location](#Node-Project-Path)
- [Change MySQL database/user/password](#MySQL-Database-User)
- [Change PostgreSQL database/user/password](#PostgreSQL-Database-User)
- [Change NGINX reverse proxy port](#NGINX-Reverse-Proxy-Port)
- [Change the timezone](#Change-the-timezone)
- [Use RabbitMQ plugins](#Use-RabbitMQ-plugins)
- [Change the RabbitMQ user/password](#Change-RabbitMQ-User)
- [Modify Redis config](#Modify-Redis-Config)
- [Contributing](#Contributing)
- [License](#License)
- [Credits](#credits)
<a name="Requirements"></a>
## Requirements
* [Docker Engine 17.06+](https://docs.docker.com/engine/installation/)
* [Docker Compose 1.8+](https://docs.docker.com/compose/install/)
<a name="Installation"></a>
## Installation
As a git submodule:
```bash
git submodule add https://github.com/Osedea/nodock.git
```
Clone into your project:
```bash
git clone https://github.com/Osedea/nodock.git
```
We recommend you [fork this repository](https://github.com/Osedea/nodock#fork-destination-box) if you intend to add project specific scripts/configurations.
<a name="Usage"></a>
## Usage
```bash
cd nodock
# Run "node" and "nginx"
docker-compose up -d node nginx
```
To overwrite the `docker-compose.yml` file you can use a `docker-compose.override.yml`
```yaml
# docker-compose.override.yml
version: '3'
services:
[...]
```
<a name="Examples"></a>
## Examples
We provide examples of configurations you might use for a specific stack. Each example has it's own README file with instructions.
* [Simple Web with Apache](https://github.com/Osedea/nodock/tree/master/_examples/apache) - Node + Apache
* [Simple Web with Nginx](https://github.com/Osedea/nodock/tree/master/_examples/nginx) - Node + NGINX
* [MySQL](https://github.com/Osedea/nodock/tree/master/_examples/mysql) - MySQL + Node + NGINX
* [PostgreSQL](https://github.com/Osedea/nodock/tree/master/_examples/postgresql) - PostgreSQL + Node + NGINX
* [Mongo](https://github.com/Osedea/nodock/tree/master/_examples/mongo) - MongoDB + Node + NGINX
* [RabbitMQ](https://github.com/Osedea/nodock/tree/master/_examples/rabbitmq) - RabbitMQ + Node + NGINX
* [Memcached](https://github.com/Osedea/nodock/tree/master/_examples/memcached) - Memcached + Node + NGINX
* [Redis](https://github.com/Osedea/nodock/tree/master/_examples/redis) - Redis + Node + NGINX
* [RethinkDB](https://github.com/Osedea/nodock/tree/master/_examples/rethinkdb) - RethinkDB + Node + NGINX
* [2 Node Apps](https://github.com/Osedea/nodock/tree/master/_examples/2-nodes) - Node + Node + NGINX
<a name="Workspace"></a>
## Workspace
The `workspace` container is where you want to be manually running commands for `NoDock`. You can use this container to initialize your project, for task-automation, for [cronjobs](#Cronjobs), etc.
<a name="HTTPS"></a>
## Using HTTPS
By default HTTPS is disabled. To enable it, you may use the following settings
```yaml
# docker-compose.override.yml
[...]
nginx:
build:
args:
- WEB_SSL=true
```
Add your certificate to `nginx/certs/cacert.pem` and the private key to `nginx/certs/privkey.pem`.
<a name="SelfSigned"></a>
#### Generate and use a self-signed cert
`SELF_SIGNED: "true"` will generate the necessary files, do note that `SELF_SIGNED: "true"` as no effect if `WEB_SSL: "false"`
```yaml
# docker-compose.override.yml
[...]
nginx:
build:
args:
- WEB_SSL=true
- SELF_SIGNED=true
```
<a name="Certbot"></a>
#### Use Certbot (Let's Encrypt) to generate the cert
`CN` must be a publicly accessible address and `EMAIL` should be the server admin contact email.
```yaml
# docker-compose.override.yml
[...]
nginx:
build:
args:
- WEB_SSL=true
certbot:
environment:
- CN=example.com
- EMAIL=fake@gmail.com
```
Don't forget to bring up the container if you plan on using certbot (`docker-compose up -d certbot`).
<a name="Non-Web"></a>
## Running a single non-web container
The default NGINX server block configuration is aimed at web projects but if you want to have a single non-web container you can do something similar to the following configuration.
```yaml
# docker-compose.override.yml
[...]
nginx:
build:
args:
-NO_DEFAULT=true
ports:
- "10000:10000"
```
Do note that using `NO_DEFAULT` makes `WEB_REVERSE_PROXY_PORT`, `WEB_SSL` and `SELF_SIGNED` have no effect.
You will then have to provide your own NGINX server block like so
```
# nginx/sites/custom-node.conf
server {
listen 10000 default_server;
location / {
proxy_pass http://node:5000;
}
}
```
<a name="Multi-Node"></a>
## Running multiple node containers
To add more node containers, simply add the following to your `docker-compose.override.yml` or environment specific docker-compose file.
```yaml
# docker-compose.override.yml
[...]
node2: # name of new container
build: # reuse the same values from the node service, cannot use extends in docker-compose 3+
context: ./node
args:
- NODE_VERSION=latest
- PROJECT_PATH=/opt/app/
- NODE_ENV=production
- YARN=false
volumes:
- ../:/opt/app
entrypoint: run-nodock "node alternate.js" # the entrypoint for the "node2" container
nginx:
ports:
- "10000:10000" # the port(s) to forward for the "node2" container
links:
- node2 # link "nginx" to "node2"
```
You'll also need to add a server block for "node2".
```
# nginx/sites/node2.conf
server {
listen 10000 default_server;
location / {
proxy_pass http://node2:8000;
}
}
```
<a name="Cronjobs"></a>
## Cronjobs
You can run cronjobs in the [Workspace](#Workspace) by storing them in the `workspace/crontab/root` file.
```
# workspace/crontab/root
* * * * * echo "Every Minute" >> /var/log/cron.log
```
<a name="More-Options"></a>
## More Options
To customize the NoDock installation, either add a `docker-compose.override.yml` in the NoDock directory or store environment specific configurations.
```bash
docker-compose -f nodock/docker-compose.yml -f docker-compose.dev.yml up -d
```
<a name="Use-Yarn"></a>
#### Use Yarn
Set the `YARN` argument to `true`.
```yaml
# docker-compose.override.yml
[...]
node:
build:
args:
- YARN=true
```
<a name="Node-Entrypoint"></a>
#### Change the node entrypoint
Use `main.js` instead of `index.js`
```yaml
# docker-compose.override.yml
[...]
node:
entrypoint: run-nodock "node main.js"
```
<a name="Node-Environment"></a>
#### Change the Node Environment
The default `NODE_ENV` value is `production`, you can change it to development by doing the following
```yaml
# docker-compose.override.yml
[...]
node:
build:
args:
- NODE_ENV=development
```
<a name="Node-Version"></a>
#### Use a specific Node version
The default node version is `latest`, this is **NOT** advisable for production
```yaml
# docker-compose.override.yml
[...]
node:
build:
args:
- NODE_VERSION=4.6.0
```
<a name="Node-Project-Path"></a>
#### Change the Node project path
You can specify a `PROJECT_PATH` to change the directory in which `npm` will perform it's `install` command and the directory in which `run-nodock` will run the entrypoint script. This is most desirable when running more than one Node project at a time since they are bound to each have their own `package.json` file.
```yaml
# docker-compose.override.yml
[...]
node:
build:
args:
PROJECT_PATH: somefolder # note that this is the same as "/opt/app/somefolder"
```
<a name="MySQL-Database-User"></a>
#### Change the MySQL database/user/password
```yaml
# docker-compose.override.yml
[...]
mysql:
build:
args:
- MYSQL_DATABASE=default_database
- MYSQL_USER=default_user
- MYSQL_PASSWORD=secret
```
<a name="PostgreSQL-Database-User"></a>
#### Change the PostgreSQL database/user/password
```yaml
# docker-compose.override.yml
[...]
postgresql:
build:
args:
- POSTGRES_DB=default_db
- POSTGRES_USER=default_user
- POSTGRES_PASSWORD=secret
```
<a name="NGINX-Reverse-Proxy-Port"></a>
#### Change the NGINX reverse proxy port
Use port `8080` instead of `8000` to bind your Node server
```yaml
# docker-compose.override.yml
[...]
nginx:
build:
args:
- WEB_REVERSE_PROXY_PORT=8080
```
<a name="Change-the-timezone"></a>
#### Change the timezone
To change the timezone for the `workspace` container, modify the `TZ` build argument in the Docker Compose file to one in the [TZ database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
For example, if I want the timezone to be `New York`:
```yaml
# docker-compose.override.yml
[...]
workspace:
build:
context: ./workspace
args:
- TZ="America/New_York"
```
<a name="Use-RabbitMQ-plugins"></a>
#### Use RabbitMQ plugins
At the moment, NoDock supports 2 plugins: [Management](https://www.rabbitmq.com/management.html) and [Federation](https://www.rabbitmq.com/federation.html).
To activate them, change their values to `true` in your docker-compose file:
```yaml
# docker-compose.override.yml
[...]
rabbitmq:
build:
args:
- MANAGEMENT=true
- FEDERATION=true
```
<a name="Change-RabbitMQ-User"></a>
#### Change the RabbitMQ user/password
```yaml
# docker-compose.override.yml
[...]
rabbitmq:
build:
args:
- RABBITMQ_DEFAULT_USER=custom_user
- RABBITMQ_DEFAULT_PASS=custom_pass
```
<a name="Modify-Redis-Config"></a>
#### Modify the Redis config
You can edit `redis/redis.conf` to modify the redis config.
<a name="Contributing"></a>
## Contributing
Do not hesitate to contribute to NoDock by creating an issue, fixing a bug or bringing a new idea to the table.
To fix a bug or introduce a new feature, please create a PR, we will merge it in to the `master` branch after review.
We thank you in advance for contributing.
<a name="License"></a>
## License
[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE) (MIT)
<a name="credits"></a>
## Credits
NoDock uses Open Source components. You can find the source code of their open source projects along with license information below. We acknowledge and are grateful to these developers for their contributions to open source.
Project: LaraDock https://github.com/LaraDock/laradock <br>
Copyright (c) 2016 Mahmoud Zalt (mahmoud@zalt.me) <br>
License (MIT) https://github.com/LaraDock/laradock/blob/master/LICENSE <br>
Project: baseimage-docker https://github.com/phusion/baseimage-docker <br>
Copyright (c) 2013-2015 Phusion Holding B.V. <br>
License (MIT) https://github.com/phusion/baseimage-docker/blob/master/LICENSE.txt <br>
-30
View File
@@ -1,30 +0,0 @@
FROM httpd:2.4
# openssl not installed in image
RUN apt-get update && apt-get install openssl
RUN mkdir /usr/local/apache2/templates \
&& mkdir /usr/local/apache2/sites-available \
&& rm /usr/local/apache2/conf/httpd.conf \
&& rm /usr/local/apache2/conf/extra/*.conf
COPY httpd.conf /usr/local/apache2/conf/httpd.conf
COPY scripts /root/scripts/
COPY certs /etc/ssl/
COPY sites /usr/local/apache2/templates
ARG WEB_REVERSE_PROXY_PORT=8000
ARG WEB_SSL=false
ARG SELF_SIGNED=false
ARG NO_DEFAULT=false
ENV WEB_REVERSE_PROXY_PORT=$WEB_REVERSE_PROXY_PORT
ENV WEB_SSL=$WEB_SSL
ENV SELF_SIGNED=$SELF_SIGNED
ENV NO_DEFAULT=$NO_DEFAULT
RUN /bin/bash /root/scripts/build-apache.sh
CMD ["apachectl", "-D", "FOREGROUND"]
View File
-100
View File
@@ -1,100 +0,0 @@
ServerRoot "/usr/local/apache2"
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule filter_module modules/mod_filter.so
LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
<IfModule unixd_module>
User www-data
Group www-data
</IfModule>
ServerAdmin you@example.com
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/usr/local/apache2/htdocs"
<Directory "/usr/local/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog /proc/self/fd/2
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog /proc/self/fd/1 common
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
</IfModule>
<Directory "/usr/local/apache2/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule headers_module>
RequestHeader unset Proxy early
</IfModule>
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
Include sites-available/*.conf
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
-20
View File
@@ -1,20 +0,0 @@
#!/bin/bash
for conf in /usr/local/apache2/templates/*.conf; do
mv $conf "/usr/local/apache2/sites-available/"$(basename $conf) > /dev/null
done
for template in /usr/local/apache2/templates/*.template; do
mv $template "/usr/local/apache2/sites-available/"$(basename $template)".conf" > /dev/null
done
if [[ "$NO_DEFAULT" = true ]]; then
rm /usr/local/apache2/sites-available/node.template.conf
rm /usr/local/apache2/sites-available/node-https.template.conf
else
if [[ "$WEB_SSL" = false ]]; then
rm /usr/local/apache2/sites-available/node-https.template.conf
fi
fi
. /root/scripts/run-openssl.sh
-31
View File
@@ -1,31 +0,0 @@
#!/bin/bash
if [[ "$WEB_SSL" = true && "$NO_DEFAULT" = false ]]; then
if [[ "$SELF_SIGNED" = true ]]; then
echo "---------------------------------------------------------"
echo "APACHE: Generating certificates"
echo "---------------------------------------------------------"
openssl req \
-new \
-newkey rsa:4096 \
-days 1095 \
-nodes \
-x509 \
-subj "/C=FK/ST=Fake/L=Fake/O=Fake/CN=0.0.0.0" \
-keyout /etc/ssl/privkey1.pem \
-out /etc/ssl/cert1.pem
chown www-data:www-data /etc/ssl/cert1.pem
chown www-data:www-data /etc/ssl/privkey1.pem
else
echo "---------------------------------------------------------"
echo "APACHE: Using certificates in 'nodock/apache/certs/'"
echo "---------------------------------------------------------"
if [ -e /var/certs/cert1.pem ]; then
cp /var/certs/cert1.pem /etc/ssl/cert1.pem
fi
if [ -e /var/certs/privkey1.pem ]; then
cp /var/certs/privkey1.pem /etc/ssl/privkey1.pem
fi
fi
fi
-17
View File
@@ -1,17 +0,0 @@
# environment variables
# WEB_REVERSE_PROXY_PORT ${WEB_REVERSE_PROXY_PORT}
Listen 443
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/cert1.pem
SSLCertificateKeyFile /etc/ssl/privkey1.pem
ProxyPass / http://node:${WEB_REVERSE_PROXY_PORT}
ErrorLog logs/https-error.log
CustomLog logs/https-access.log common
</VirtualHost>
-14
View File
@@ -1,14 +0,0 @@
# environment variables
# WEB_REVERSE_PROXY_PORT ${WEB_REVERSE_PROXY_PORT}
Listen 80
<VirtualHost *:80>
ProxyPass / http://node:${WEB_REVERSE_PROXY_PORT}
# ProxyPassReverse / http://node:${WEB_REVERSE_PROXY_PORT}
ErrorLog logs/http-error.log
CustomLog logs/http-access.log common
</VirtualHost>
-8
View File
@@ -1,8 +0,0 @@
FROM phusion/baseimage:0.9.19
COPY scripts /root/scripts/
RUN apt-get update
RUN apt-get install -y letsencrypt
ENTRYPOINT bash -c "bash /root/scripts/run-certbot.sh && sleep infinity"
-1
View File
@@ -1 +0,0 @@
*.pem
View File
View File
-6
View File
@@ -1,6 +0,0 @@
#!/bin/bash
letsencrypt certonly --webroot -w /var/www/letsencrypt -d "$CN" --agree-tos --email "$EMAIL" --non-interactive --text
cp /etc/letsencrypt/archive/"$CN"/cert1.pem /var/certs/cert1.pem
cp /etc/letsencrypt/archive/"$CN"/privkey1.pem /var/certs/privkey1.pem
-10
View File
@@ -1,10 +0,0 @@
---
name: NoDock
blurb: NoDock is the Docker solution for Node. Open-source full-stack environment for your Node projects
description: |
Framework Agnostic: MEAN, Meteor, Sails, etc. Run the stack you choose, the way you want. Totally unopinionated, fully customizable. Better, Faster & Stronger: Docker + Docker Compose ensures your environment is fast and stable for development, testing and production. Focus on Code: Plug-and-play configurations allow you to get started in minutes. Reduce the learning curve for new developers.
email: philippe.trepanier@osedea.com
repo_url: https://github.com/Osedea/nodock
tags: node,docker,nginx,apache,mysql,certbot,yarn,mongodb,memcached,rabbitmq
private: false
cmd:
-75
View File
@@ -1,75 +0,0 @@
version: '3.3'
services:
node:
build:
context: ./node
args:
- NODE_VERSION=latest
- PROJECT_PATH=/opt/app/
- NODE_ENV=production
- YARN=false
volumes:
- ../server:/opt/app
entrypoint: run-nodock "knex migrate:latest && node build/bundle.js"
ports:
- "3000:3000"
expose:
- "3000"
tty: true
mysql:
build:
context: ./mysql
volumes:
- ../data/mysql/:/var/lib/mysql
expose:
- "3306"
ports:
- 3306:3306
nginx:
build:
context: ./nginx
args:
- WEB_REVERSE_PROXY_PORT=3000
- WEB_SSL=false
- SELF_SIGNED=false
- NO_DEFAULT=false
volumes:
- ../data/logs/nginx/:/var/log/nginx
- ./certbot/certs/:/var/certs
- ../client/dist/:/var/www/moosher
ports:
- "80:80"
- "443:443"
tty: true
certbot:
build:
context: ./certbot
links:
- nginx
volumes:
- ./certbot/letsencrypt/:/var/www/letsencrypt
- ./certbot/certs/:/var/certs
browserless:
image: browserless/chrome:latest
container_name: "browserless_bigcapital"
restart: always
environment:
- PREBOOT_CHROME=true
- MAX_CONCURRENT_SESSIONS=1
ports:
- "4080:3000"
mongo:
build: ./mongo
expose:
- "27017"
volumes:
- ./data/mongo/:/var/lib/mongodb
ports:
- "27017:27017"
-1
View File
@@ -1 +0,0 @@
nodock.io
-190
View File
@@ -1,190 +0,0 @@
html, body {
color: #666666;
font-family: 'Roboto', sans-serif;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: 15px;
}
code, pre {
text-align: left;
}
h3 {
font-size: 20px;
color: #4A4A4A;
position: relative;
}
.uppercase {
text-transform: uppercase;
}
h3 img {
position: absolute;
display: none;
}
.lightning-icon {
left: -34px;
}
.box-icon {
left: -43px;
}
h5 {
font-size: 14px;
color: #9B9B9B;
margin: 10px 0 18px 0;
}
.gist {
font-size: 13px;
line-height: 18px;
margin-bottom: 30px;
width: 100%;
}
.gist pre {
font-family: Menlo, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', monospace !important;
}
.gist .gist-file {
border-bottom: none !important;
background-color: #FBFBFB !important;
}
.gist-meta {
display: none;
}
.top-section {
background-color: #FBFBFB;
border-bottom: 1px solid #E0E0E0;
}
.middle-section {
padding: 60px 0 0 0;
}
.middle-section .container {
margin-bottom: 60px;
}
.logo {
margin: 80px auto;
display: block;
}
.intro {
font-weight: 300;
margin: 120px auto 60px auto;
font-size: 21px;
text-align: center;
}
.intro span {
font-size: 16px;
}
.tech-logos {
margin: 30px auto 0 auto;
width: 100%;
}
footer {
height: 120px;
background-color: #000;
padding: 30px 0;
}
.osedea-logo {
margin: 0 auto;
display: block;
}
.cta {
height: 40px;
border: 1px solid #EE4028;
border-radius: 8px;
color: #EE4028;
font-size: 15px;
width: 300px;
margin: 90px auto;
display: block;
line-height: 40px;
text-align: center;
background-color: #FFF;
transition: background-color 0.3s ease;
transition: color 0.3s ease;
}
.cta:hover {
background-color: #EE4028;
color: #FFF;
text-decoration: none;
transition: background-color 0.3s ease;
transition: color 0.3s ease;
}
.middle-container:last-child {
margin-bottom: 0;
}
copyright {
color: #FFF;
font-size: 12px;
position: initial;
text-align: center;
display: block;
padding-top: 15px;
}
copyright a {
color: #FFF;
text-decoration: underline;
}
copyright a:hover {
color: #FFF;
}
@media (min-width: 768px) {
.intro {
font-size: 30px;
margin: 140px auto 0 auto;
}
.intro span {
font-size: 22px;
}
footer {
height: 80px;
}
.osedea-logo {
margin: 0;
display: inline;
}
copyright {
position: relative;
top: 3px;
text-align: right;
}
}
@media (min-width: 860px) {
h3 img {
display: block;
}
}
@media (min-width: 820px) {
.container{
max-width: 820px !important;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

-113
View File
@@ -1,113 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>NoDock</title>
<meta name="description" content="NoDock is the Docker solution for Node - Open-source full-stack environment for your Node projects.">
<meta name="keywords" content="node,docker,nodock,compose,docker-compose,web,development,container,certbot,nginx,mysql,memcached,mongodb,rabbitmq,opensource">
<meta property="og:url" content="http://nodock.io/">
<meta property="og:type" content="website">
<meta property="og:title" content="NoDock | Full-stack Docker environment for Node projects">
<meta property="og:description" content="NoDock is the Docker solution for Node - Open-source full-stack environment for your Node projects.">
<meta property="og:image" content="http://nodock.io/images/logo.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="NoDock | Full-stack Docker environment for Node projects">
<meta name="twitter:description" content="NoDock is the Docker solution for Node - Open-source full-stack environment for your Node projects.">
<meta name="twitter:image" content="http://nodock.io/images/logo.png">
<meta name="twitter:site" content="@osedea">
<meta name="twitter:creator" content="@osedea">
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width">
<link rel="icon" href="images/favicon.png" type="image/png">
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400" rel="stylesheet" type="text/css">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="css/styles.css" type="text/css">
</head>
<body>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-87277646-1', 'auto');
ga('send', 'pageview');
</script>
<a href="https://github.com/Osedea/nodock"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
<div class="top-section">
<div class="container">
<div class="row">
<div class="col-xs-12">
<a href="https://github.com/Osedea/nodock">
<img class="logo" src="images/logo.png" alt="NoDock Logo" title="NoDock Logo" />
</a>
<p class="intro">NoDock is the Docker solution for Node<br><span>Open-source full-stack environment for your Node projects</span></p>
</div>
<div class="col-xs-12">
<a class="cta" href="https://github.com/Osedea/nodock">Contribute on GitHub</a>
</div>
</div>
</div>
</div>
<div class="middle-section">
<div class="middle-container container">
<div class="row">
<div class="col-xs-12 col-sm-4">
<h3>Framework Agnostic</h3>
<p>
MEAN, Meteor, Sails, etc. Run the stack you choose, the way you want. Totally unopinionated, fully customizable.
</p>
</div>
<div class="col-xs-12 col-sm-4">
<h3>Better, Faster &amp; Stronger</h3>
<p>
Docker + Docker Compose v3 ensures your environment is fast and stable for development, testing and production.
</p>
</div>
<div class="col-xs-12 col-sm-4">
<h3>Focus on Code</h3>
<p>
Plug-and-play configurations allow you to get started in minutes. Reduce the learning curve for new developers.
</p>
</div>
</div>
</div>
<div class="middle-container container">
<div class="row">
<div class="col-xs-12">
<h3><img class="box-icon" src="images/box-icon.png" alt="Box Icon" title="Box Icon" />Easy to set up</h3>
<h5>It takes 2 minutes to get an app up:</h5>
<script src="https://gist.github.com/philtrep/716129ed0969ce2641dd56a63c2d7071.js"></script>
<h5>Et voilà! You can see the example up on localhost.</h5>
</div>
</div>
</div>
<div class="middle-container container">
<div class="row">
<div class="col-xs-12">
<h3><img class="lightning-icon" src="images/lightning-icon.png" alt="Lightning Icon" title="Lightning Icon" />Currently supports</h3>
<img class="tech-logos" src="images/tech-logos.png" alt="Tech Logo" title="Tech Logo" />
<h5 class="text-right">... with more coming!</h5>
</div>
<div class="col-xs-12">
<a class="cta" href="https://github.com/Osedea/nodock">Contribute on GitHub</a>
</div>
</div>
</div>
</div>
<footer>
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-3">
<a href="https://osedea.com/">
<img class="osedea-logo" src="images/osedea-logo.png" alt="Osedea Logo" title="Osedea Logo" />
</a>
</div>
<div class="col-xs-12 col-sm-9">
<copyright>
<a href="https://osedea.com/">Osedea</a> is proud to be supporting NoDock, <a href="https://github.com/Osedea">we <3 open source</a>
</copyright>
</div>
</div>
</div>
</footer>
</body>
</html>
-3
View File
@@ -1,3 +0,0 @@
FROM memcached:1.4
CMD memcached
-9
View File
@@ -1,9 +0,0 @@
FROM mongo:3.3
# Add mongo user
RUN groupadd -r mongo &&\
useradd -r -g mongo mongo
USER mongo
CMD mongod --dbpath=/var/lib/mongodb
-18
View File
@@ -1,18 +0,0 @@
FROM mysql:5.7
ADD my.cnf /etc/mysql/conf.d/my.cnf
RUN chown -R mysql:root /var/lib/mysql/
ARG MYSQL_DATABASE=bigcapital_system
ARG MYSQL_USER=root
ARG MYSQL_PASSWORD=root
ARG MYSQL_ROOT_PASSWORD=root
ENV MYSQL_DATABASE=$MYSQL_DATABASE
ENV MYSQL_USER=$MYSQL_USER
ENV MYSQL_PASSWORD=$MYSQL_PASSWORD
ENV MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
CMD ["mysqld"]
EXPOSE 3306
-2
View File
@@ -1,2 +0,0 @@
[mysqld]
bind-address = 0.0.0.0
-23
View File
@@ -1,23 +0,0 @@
FROM nginx:1.11
RUN mkdir /etc/nginx/sites-available && rm /etc/nginx/conf.d/default.conf
ADD nginx.conf /etc/nginx/
COPY scripts /root/scripts/
COPY certs /etc/ssl/
COPY sites /etc/nginx/templates
ARG WEB_REVERSE_PROXY_PORT=3000
ARG WEB_SSL=false
ARG SELF_SIGNED=false
ARG NO_DEFAULT=false
ENV WEB_REVERSE_PROXY_PORT=$WEB_REVERSE_PROXY_PORT
ENV WEB_SSL=$WEB_SSL
ENV SELF_SIGNED=$SELF_SIGNED
ENV NO_DEFAULT=$NO_DEFAULT
RUN /bin/bash /root/scripts/build-nginx.sh
CMD nginx
View File
-33
View File
@@ -1,33 +0,0 @@
user www-data;
worker_processes auto;
pid /run/nginx.pid;
daemon off;
events {
worker_connections 2048;
use epoll;
}
http {
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
types_hash_max_size 2048;
client_max_body_size 20M;
open_file_cache max=100;
gzip on;
gzip_disable "msie6";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
include /etc/nginx/mime.types;
default_type application/octet-stream;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-available/*;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
-20
View File
@@ -1,20 +0,0 @@
#!/bin/bash
for conf in /etc/nginx/templates/*.conf; do
mv $conf "/etc/nginx/sites-available/"$(basename $conf) > /dev/null
done
for template in /etc/nginx/templates/*.template; do
envsubst < $template > "/etc/nginx/sites-available/"$(basename $template)".conf"
done
if [[ "$NO_DEFAULT" = true ]]; then
rm /etc/nginx/sites-available/node.template.conf
rm /etc/nginx/sites-available/node-https.template.conf
else
if [[ "$WEB_SSL" = false ]]; then
rm /etc/nginx/sites-available/node-https.template.conf
fi
fi
. /root/scripts/run-openssl.sh
-31
View File
@@ -1,31 +0,0 @@
#!/bin/bash
if [[ "$WEB_SSL" = true && "$NO_DEFAULT" = false ]]; then
if [[ "$SELF_SIGNED" = true ]]; then
echo "---------------------------------------------------------"
echo "APACHE: Generating certificates"
echo "---------------------------------------------------------"
openssl req \
-new \
-newkey rsa:4096 \
-days 1095 \
-nodes \
-x509 \
-subj "/C=FK/ST=Fake/L=Fake/O=Fake/CN=0.0.0.0" \
-keyout /etc/ssl/privkey1.pem \
-out /etc/ssl/cert1.pem
chown www-data:www-data /etc/ssl/cert1.pem
chown www-data:www-data /etc/ssl/privkey1.pem
else
echo "---------------------------------------------------------"
echo "APACHE: Using certificates in 'nodock/apache/certs/'"
echo "---------------------------------------------------------"
if [ -e /var/certs/cert1.pem ]; then
cp /var/certs/cert1.pem /etc/ssl/cert1.pem
fi
if [ -e /var/certs/privkey1.pem ]; then
cp /var/certs/privkey1.pem /etc/ssl/privkey1.pem
fi
fi
fi
-13
View File
@@ -1,13 +0,0 @@
# environment variables
# WEB_REVERSE_PROXY_PORT ${WEB_REVERSE_PROXY_PORT}
server {
listen 443 default_server http2;
ssl on;
ssl_certificate /etc/ssl/cert1.pem;
ssl_certificate_key /etc/ssl/privkey1.pem;
location / {
proxy_pass http://node:${WEB_REVERSE_PROXY_PORT};
}
}
-32
View File
@@ -1,32 +0,0 @@
# environment variables
# WEB_REVERSE_PROXY_PORT ${WEB_REVERSE_PROXY_PORT}
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/www/moosher;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
location /api {
proxy_pass http://node:${WEB_REVERSE_PROXY_PORT};
}
}
-38
View File
@@ -1,38 +0,0 @@
FROM phusion/baseimage:0.9.19
RUN apt-get update &&\
apt-get install -y npm &&\
npm install -g n
ARG NODE_ENV=production
ARG NODE_VERSION=latest
ARG PROJECT_PATH=/opt/app/
ARG YARN=false
ENV YARN=$YARN
ENV PROJECT_PATH=$PROJECT_PATH
ENV NODE_ENV=$NODE_ENV
# Add
RUN groupadd -r www-app &&\
useradd -r -g www-app www-app
RUN mkdir -p /home/www-app &&\
chmod 777 /home/www-app -R
# Install the specified NODE_VERSION or grab latest
RUN n "$NODE_VERSION"
# Install Yarn
RUN if [ ${YARN} = true ]; then \
npm install -g yarn \
;fi
COPY scripts/run-nodock.sh /usr/bin/run-nodock
RUN chmod 700 /usr/bin/run-nodock
RUN npm install webpack -g
RUN npm install knex -g
WORKDIR /opt/app
-21
View File
@@ -1,21 +0,0 @@
#!/bin/bash
SCRIPT="$1"
if [[ ${PROJECT_PATH:0:1} = "/" ]]; then
export PROJECT_PATH=$PROJECT_PATH
else
export PROJECT_PATH="/opt/app/"$PROJECT_PATH
fi
cd $PROJECT_PATH
if [[ $YARN = true ]]; then
su -c "cd $PROJECT_PATH; yarn" -s /bin/bash www-app
else
su -c "cd $PROJECT_PATH; npm i --force" -s /bin/bash www-app
fi
chown -R www-app:www-app /opt/app
su -c "cd $PROJECT_PATH; $SCRIPT" -s /bin/bash www-app
-11
View File
@@ -1,11 +0,0 @@
FROM postgres:10.2
ARG POSTGRES_USER=default_user
ARG POSTGRES_PASSWORD=secret
ARG POSTGRES_DB=default_db
ENV POSTGRES_USER=$POSTGRES_USER
ENV POSTGRES_PASSWORD=$POSTGRES_PASSWORD
ENV POSTGRES_DB=$POSTGRES_DB
EXPOSE 5432
-15
View File
@@ -1,15 +0,0 @@
FROM rabbitmq
COPY scripts /root/scripts/
ARG MANAGEMENT=false
ARG FEDERATION=false
ARG RABBITMQ_DEFAULT_USER=guest
ARG RABBITMQ_DEFAULT_PASS=guest
ENV MANAGEMENT=$MANAGEMENT
ENV FEDERATION=$FEDERATION
ENV RABBITMQ_DEFAULT_USER=$RABBITMQ_DEFAULT_USER
ENV RABBITMQ_DEFAULT_PASS=$RABBITMQ_DEFAULT_PASS
RUN /bin/bash /root/scripts/build-rabbitmq.sh
-13
View File
@@ -1,13 +0,0 @@
#!/bin/bash
if [[ "$MANAGEMENT" = true ]]; then
rabbitmq-plugins enable --offline rabbitmq_management
fi
if [[ "$FEDERATION" = true ]]; then
rabbitmq-plugins enable --offline rabbitmq_federation
if [[ "$MANAGEMENT" = true ]]; then
rabbitmq-plugins enable --offline rabbitmq_federation_management
fi
fi
-5
View File
@@ -1,5 +0,0 @@
FROM redis:4.0
COPY redis.conf /usr/local/etc/redis/redis.conf
CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
-48
View File
@@ -1,48 +0,0 @@
daemonize no
pidfile /var/run/redis.pid
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 0
loglevel notice
logfile ""
databases 16
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes
-3
View File
@@ -1,3 +0,0 @@
FROM rethinkdb
CMD ["rethinkdb", "--bind", "all"]
-39
View File
@@ -1,39 +0,0 @@
FROM phusion/baseimage:0.9.19
RUN apt-get update && \
apt-get install -y npm \
mysql-client \
sqlite3 \
iputils-ping && \
npm install -g n
##
## Timezone
##
ARG TZ=UTC
ENV TZ ${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
##
## Node
##
ARG NODE_VERSION=latest
# Install the specified NODE_VERSION or grab latest
RUN n "$NODE_VERSION"
# Install YARN
RUN npm i -g yarn
##
## Cron
##
COPY ./crontab /var/spool/cron/crontabs
WORKDIR /opt/app
ENTRYPOINT sleep infinity
-2
View File
@@ -1,2 +0,0 @@
# This is the root crontab file
# * * * * * echo "Every Minute" >> /var/log/cron.log
+17618 -27
View File
File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

-9
View File
@@ -1,9 +0,0 @@
{
"presets": ["@babel/preset-env"],
"retainLines": true,
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-dynamic-import"
]
}
-40
View File
@@ -1,40 +0,0 @@
MAIL_HOST=smtp.mailtrap.io
MAIL_USERNAME=842f331d3dc005
MAIL_PASSWORD=172f97b34f1a17
MAIL_PORT=587
MAIL_SECURE=false
SYSTEM_DB_CLIENT=mysql
SYSTEM_DB_HOST=127.0.0.1
SYSTEM_DB_USER=root
SYSTEM_DB_PASSWORD=root
SYSTEM_DB_NAME=bigcapital_system
SYSTEM_MIGRATIONS_DIR=./src/system/migrations
SYSTEM_SEEDS_DIR=./src/system/seeds
TENANT_DB_CLIENT=mysql
TENANT_DB_NAME_PERFIX=bigcapital_tenant_
TENANT_DB_HOST=127.0.0.1
TENANT_DB_PASSWORD=root
TENANT_DB_USER=root
TENANT_DB_CHARSET=utf8
TENANT_MIGRATIONS_DIR=src/database/migrations
TENANT_SEEDS_DIR=src/database/seeds/core
DB_MANAGER_SUPER_USER=root
DB_MANAGER_SUPER_PASSWORD=root
MONGODB_DATABASE_URL=mongodb://localhost/bigcapital
JWT_SECRET=b0JDZW56RnV6aEthb0RGPXVEcUI
CONTACT_US_MAIL=support@bigcapital.ly
BASE_URL=https://bigcapital.ly
LICENSES_AUTH_USER=root
LICENSES_AUTH_PASSWORD=root
AGENDASH_AUTH_USER=agendash
AGENDASH_AUTH_PASSWORD=123123
BROWSER_WS_ENDPOINT=ws://localhost:4080/
-41
View File
@@ -1,41 +0,0 @@
module.exports = {
env: {
browser: false,
es6: true,
node: true,
mocha: true,
},
extends: [
'airbnb-base',
],
plugins: [
'import',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
rules: {
"no-unused-vars": [
"error",
{
"varsIgnorePattern": "describe|afterEach|beforeEach"
}
],
"import/no-extraneous-dependencies": [
"error", {"devDependencies": true}
],
},
settings: {
'import/resolver': {
node: {},
webpack: {
config: 'webpack.config.js'
}
},
},
};
-7
View File
@@ -1,7 +0,0 @@
/node_modules/
/.env
/storage
package-lock.json
stdout.log
/dist
/build
-28
View File
@@ -1,28 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased] - yyyy-mm-dd
Here we write upgrading notes for brands. It's a team effort to make them as
straightforward as possible.
### Added
- Dynamic filter for resources list.
- Dynamic search for resources list.
- Dynamic resources to switch between active and inactive items.
- Add virtual computed attributes to sale invoice list and individual.
- This CHANGELOG file to hopefully serve as an evolving example of a
standardized open source project CHANGELOG.
- Remove subscription free trial.
### Changed
- Redesigne organization tenant metadata table to depend on table on system
database instead of tenant database.
-
### Fixed
-203
View File
@@ -1,203 +0,0 @@
import commander from 'commander';
import color from 'colorette';
import argv from 'getopts'
import config from '../src/config';
import {
initSystemKnex,
getAllSystemTenants,
initTenantKnex,
exit,
success,
log,
} from './utils';
// - bigcapital system:migrate:latest
// - bigcapital system:migrate:rollback
// - bigcapital tenants:migrate:latest
// - bigcapital tenants:migrate:latest --tenant_id=XXX
// - bigcapital tenants:migrate:rollback
// - bigcapital tenants:migrate:rollback --tenant_id=XXX
// - bigcapital tenants:migrate:make
// - bigcapital system:migrate:make
// - bigcapital tenants:list
commander
.command('system:migrate:rollback')
.description('Migrate the system database of the application.')
.action(async () => {
try {
const sysKnex = await initSystemKnex();
const [batchNo, _log] = await sysKnex.migrate.rollback();
if (_log.length === 0) {
success(color.cyan('Already at the base migration'));
}
success(
color.green(
`Batch ${batchNo} rolled back: ${_log.length} migrations`
) + (argv.verbose ? `\n${color.cyan(_log.join('\n'))}` : '')
);
} catch(error) {
exit(error);
}
});
commander
.command('system:migrate:latest')
.description('Rollback latest mgiration of the system database.')
.action(async () => {
try {
const sysKnex = await initSystemKnex();
const [batchNo, log] = await sysKnex.migrate.latest();
if (log.length === 0) {
success(color.cyan('Already up to date'));
}
success(
color.green(`Batch ${batchNo} run: ${log.length} migrations`) +
(argv.verbose ? `\n${color.cyan(log.join('\n'))}` : '')
);
} catch(error) {
exit(error);
}
});
commander
.command('system:migrate:make <name>')
.description('Created a named migration file to the system database.')
.action(async (name) => {
const sysKnex = await initSystemKnex();
sysKnex.migrate.make(name).then((name) => {
success(color.green(`Created Migration: ${name}`));
}).catch(exit)
});
commander
.command('tenants:migrate:make <name>')
.description('Created a name migration file to the tenants databases.')
.action(async (name) => {
const sysKnex = await initTenantKnex();
sysKnex.migrate.make(name).then((name) => {
success(color.green(`Created Migration: ${name}`));
}).catch(exit)
});
commander
.command('tenants:list')
.description('Retrieve a list of all system tenants databases.')
.action(async (cmd) => {
try{
const sysKnex = await initSystemKnex();
const tenants = await getAllSystemTenants(sysKnex);
tenants.forEach((tenant) => {
const dbName = `${config.tenant.db_name_prefix}${tenant.organizationId}`;
console.log(`ID: ${tenant.id} | Organization ID: ${tenant.organizationId} | DB Name: ${dbName}`);
});
} catch(error) { exit(error); };
success('---');
});
commander
.command('tenants:migrate:rollback')
.description('Rollback the last batch of tenants migrations.')
.option('-t, --tenant_id [tenant_id]', 'Which tenant id do you migrate.')
.action(async (cmd) => {
try {
const sysKnex = await initSystemKnex();
const tenants = await getAllSystemTenants(sysKnex);
const tenantsOrgsIds = tenants.map((tenant) => tenant.organizationId);
if (cmd.tenant_id && tenantsOrgsIds.indexOf(cmd.tenant_id) === -1) {
exit(`The given tenant id ${cmd.tenant_id} is not exists.`);
}
const migrateOpers = [];
const migrateTenant = async (organizationId) => {
try {
const tenantKnex = await initTenantKnex(organizationId);
const [batchNo, _log] = await tenantKnex.migrate.rollback();
const tenantDb = `${config.tenant.db_name_prefix}${organizationId}`;
if (_log.length === 0) {
log(color.cyan('Already at the base migration'));
}
log(
color.green(
`Tenant: ${tenantDb} > Batch ${batchNo} rolled back: ${_log.length} migrations`
) + (argv.verbose ? `\n${color.cyan(_log.join('\n'))}` : '')
);
log('---------------');
} catch (error) { exit(error); }
};
if (!cmd.tenant_id) {
tenants.forEach((tenant) => {
const oper = migrateTenant(tenant.organizationId);
migrateOpers.push(oper);
});
} else {
const oper = migrateTenant(cmd.tenant_id);
migrateOpers.push(oper);
}
Promise.all(migrateOpers).then(() => {
success('All tenants are rollbacked.');
});
} catch (error) { exit(error); }
});
commander
.command('tenants:migrate:latest')
.description('Migrate all tenants or the given tenant id.')
.option('-t, --tenant_id [tenant_id]', 'Which tenant id do you migrate.')
.action(async (cmd) => {
try {
const sysKnex = await initSystemKnex();
const tenants = await getAllSystemTenants(sysKnex);
const tenantsOrgsIds = tenants.map(tenant => tenant.organizationId);
if (cmd.tenant_id && tenantsOrgsIds.indexOf(cmd.tenant_id) === -1) {
exit(`The given tenant id ${cmd.tenant_id} is not exists.`);
}
// Validate the tenant id exist first of all.
const migrateOpers = [];
const migrateTenant = async (organizationId) => {
try {
const tenantKnex = await initTenantKnex(organizationId);
const [batchNo, _log] = await tenantKnex.migrate.latest();
const tenantDb = `${config.tenant.db_name_prefix}${organizationId}`;
if (_log.length === 0) {
log(color.cyan('Already up to date'));
}
log(
color.green(`Tenant ${tenantDb} > Batch ${batchNo} run: ${_log.length} migrations`) +
(argv.verbose ? `\n${color.cyan(log.join('\n'))}` : '')
);
log('-------------------');
} catch (error) {
log(error);
}
}
if (!cmd.tenant_id) {
tenants.forEach((tenant) => {
const oper = migrateTenant(tenant.organizationId);
migrateOpers.push(oper);
});
} else {
const oper = migrateTenant(cmd.tenant_id);
migrateOpers.push(oper);
}
Promise.all(migrateOpers).then(() => {
success('All tenants are migrated.');
});
} catch (error) {
exit(error);
}
});
commander.parse(process.argv);
-94
View File
@@ -1,94 +0,0 @@
import Knex from 'knex';
import { knexSnakeCaseMappers } from 'objection';
import color from 'colorette';
import config from '../src/config';
// import { systemKnexConfig } from '../src/config/knexConfig';
function initSystemKnex() {
return Knex({
client: config.system.db_client,
connection: {
host: config.system.db_host,
user: config.system.db_user,
password: config.system.db_password,
database: config.system.db_name,
charset: 'utf8',
},
migrations: {
directory: config.system.migrations_dir,
},
seeds: {
directory: config.system.seeds_dir,
},
pool: { min: 0, max: 7 },
...knexSnakeCaseMappers({ upperCase: true }),
});
}
function getAllSystemTenants(knex) {
return knex('tenants');
}
function initTenantKnex(organizationId) {
return Knex({
client: config.tenant.db_client,
connection: {
host: config.tenant.db_host,
user: config.tenant.db_user,
password: config.tenant.db_password,
database: `${config.tenant.db_name_prefix}${organizationId}`,
charset: config.tenant.charset,
},
migrations: {
directory: config.tenant.migrations_dir,
},
seeds: {
directory: config.tenant.seeds_dir,
},
pool: { min: 0, max: 5 },
...knexSnakeCaseMappers({ upperCase: true }),
})
}
function exit(text) {
if (text instanceof Error) {
console.error(
color.red(`${text.detail ? `${text.detail}\n` : ''}${text.stack}`)
);
} else {
console.error(color.red(text));
}
process.exit(1);
}
function success(text) {
console.log(text);
process.exit(0);
}
function log(text) {
console.log(text);
}
function getDeepValue(prop, obj) {
if (!Object.keys(obj).length) { return []; }
return Object.entries(obj).reduce((acc, [key, val]) => {
if (key === prop) {
acc.push(val);
} else {
acc.push(Array.isArray(val) ? val.map(getIds).flat() : getIds(val));
}
return acc.flat();
}, []);
}
export {
initTenantKnex,
initSystemKnex,
getAllSystemTenants,
exit,
success,
log,
getDeepValue,
}
-17
View File
@@ -1,17 +0,0 @@
{
"restartable": "rs",
"watch": [
"src",
".env"
],
"ignore": [
".git",
"src/**/*.spec.ts"
],
"execMap": {
"ts": "node --inspect -r ts-node/register/transpile-only ./src/server.ts"
},
"env": {
"NODE_ENV": "development"
}
}
-147
View File
@@ -1,147 +0,0 @@
{
"name": "bigcapital-server",
"version": "0.0.1",
"description": "",
"main": "src/server.ts",
"scripts": {
"start": "cross-env NODE_PATH=./src nodemon",
"inspect": "cross-env NODE_PATH=./src nodemon src/server.ts",
"copy-i18n": "cpy --cwd=src/locales --parents '**/*.json' ../../build/locales",
"clear": "rimraf build",
"build:ts": "tsc -p tsconfig.json",
"build:resources": "gulp --gulpfile=scripts/gulpfile.js styles styles-rtl",
"build": "npm-run-all clear build:ts copy-i18n"
},
"author": "Ahmed Bouhuolia, <a.bouhuolia@gmail.com>",
"license": "ISC",
"bin": {
"bigcapital": "./bin/bigcapital.js"
},
"dependencies": {
"@hapi/boom": "^7.4.3",
"@types/i18n": "^0.8.7",
"@types/mathjs": "^6.0.12",
"accepts": "^1.3.7",
"accounting": "^0.4.1",
"agenda": "^3.1.0",
"agendash": "^1.0.0",
"app-root-path": "^3.0.0",
"async": "^3.2.0",
"axios": "^0.20.0",
"bcryptjs": "^2.4.3",
"bluebird": "^3.7.2",
"compression": "^1.7.4",
"country-codes-list": "^1.6.8",
"cpy": "^8.1.2",
"cpy-cli": "^3.1.1",
"crypto-random-string": "^3.2.0",
"csurf": "^1.10.0",
"deep-map": "^2.0.0",
"deepdash": "^5.3.7",
"dotenv": "^8.1.0",
"errorhandler": "^1.5.1",
"es6-weak-map": "^2.0.3",
"esm": "^3.2.25",
"event-dispatch": "^0.4.1",
"express": "^4.17.1",
"express-basic-auth": "^1.2.0",
"express-boom": "^3.0.0",
"express-fileupload": "^1.1.7-alpha.3",
"express-oauth-server": "^2.0.0",
"express-validator": "^6.8.0",
"gulp": "^4.0.2",
"gulp-sass": "^5.0.0",
"helmet": "^3.21.0",
"i18n": "^0.8.5",
"is-my-json-valid": "^2.20.5",
"js-money": "^0.6.3",
"jsonwebtoken": "^8.5.1",
"knex": "^0.20.3",
"knex-cleaner": "^1.3.0",
"knex-db-manager": "^0.6.1",
"libphonenumber-js": "^1.9.6",
"lodash": "^4.17.15",
"mathjs": "^9.4.0",
"memory-cache": "^0.2.0",
"moment": "^2.24.0",
"moment-range": "^4.0.2",
"mongoose": "^5.10.0",
"mustache": "^3.0.3",
"mysql": "^2.17.1",
"mysql2": "^1.6.5",
"node-cache": "^4.2.1",
"nodemailer": "^6.3.0",
"nodemon": "^1.19.1",
"object-hash": "^2.0.3",
"objection": "^2.0.10",
"objection-filter": "^4.0.1",
"objection-soft-delete": "^1.0.7",
"pluralize": "^8.0.0",
"pug": "^3.0.2",
"puppeteer": "^10.2.0",
"qim": "0.0.52",
"ramda": "^0.27.1",
"rate-limiter-flexible": "^2.1.14",
"reflect-metadata": "^0.1.13",
"rtl-detect": "^1.0.4",
"ts-transformer-keys": "^0.4.2",
"tsyringe": "^4.3.0",
"uniqid": "^5.2.0",
"winston": "^3.2.1"
},
"devDependencies": {
"@types/lodash": "^4.14.158",
"chai": "^4.2.0",
"chai-http": "^4.3.0",
"chai-things": "^0.2.0",
"colorette": "^1.2.0",
"commander": "^5.0.0",
"cross-env": "^5.2.0",
"eslint": "^6.2.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-import-resolver-webpack": "^0.11.1",
"eslint-loader": "^2.2.1",
"eslint-plugin-import": "^2.19.1",
"faker": "^4.1.0",
"getopts": "^2.2.5",
"gulp-postcss": "^9.0.0",
"gulp-rename": "^2.0.0",
"knex-factory": "0.0.6",
"merge-stream": "^2.0.0",
"mocha": "^5.2.0",
"module-alias": "^2.2.2",
"npm-run-all": "^4.1.5",
"nyc": "^14.1.1",
"regenerator-runtime": "^0.13.7",
"rimraf": "^3.0.2",
"rtlcss": "^3.3.0",
"sass": "^1.37.5",
"sinon": "^7.4.2",
"ts-node": "^9.0.0",
"typedi": "^0.8.0",
"typescript": "^3.9.7",
"webpack-cli": "^4.6.0"
},
"_moduleAliases": {
"api": "build/api",
"collection": "build/collection",
"config": "build/config",
"data": "build/data",
"database": "build/database",
"decorators": "build/decorators",
"exceptions": "build/exceptions",
"interfaces": "build/interfaces",
"jobs": "build/jobs",
"lib": "build/lib",
"loaders": "build/loaders",
"locales": "build/locales",
"models": "build/models",
"repositories": "build/repositories",
"services": "build/services",
"subscribers": "build/subscribers",
"system": "build/system",
"utils": "build/utils"
},
"_moduleAliases": {}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-35
View File
@@ -1,35 +0,0 @@
@import "./normalize.scss";
*,
*::before,
*::after {
box-sizing: border-box;
}
th {
text-align: inherit; // 2
text-align: -webkit-match-parent; // 3
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
body{
margin: 0;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
background-color: #fff;
direction: ltr;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: transparent;
}
File diff suppressed because one or more lines are too long
@@ -1,18 +0,0 @@
@import "../base.scss";
@import "../fonts.scss";
body {
background: #f8f9fa;
text-align: left;
html[lang^='ar'] & {
font-family: "Segoe UI";
}
html[lang^='en'] & {
font-family: "Noto Sans";
}
@media print {
background: #fff;
}
}
-141
View File
@@ -1,141 +0,0 @@
@import "../layouts/paper-layout.scss";
.estimate{
text-align: left;
padding: 45px;
&__header{
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 0 60px;
.organization{
.title{
margin: 0 0 10px;
}
}
.paper{
.title{
font-weight: 400;
text-transform: uppercase;
margin: 0 0 6px;
font-size: 26px;
}
}
}
&__meta{
display: flex;
flex-wrap: wrap;
margin-bottom: 40px;
&-item{
flex: 0 1 25%;
padding-right: 10px;
font-size: 16px;
font-weight: 400;
line-height: 1.6rem;
margin-bottom: 20px;
display: flex;
flex-direction: column;
.value{
color: #000;
}
.label{
color: #555;
margin-bottom: 2px;
}
&--amount{
flex: 0 1 50%;
.value{
font-weight: bold;
font-size: 20px;
}
}
&--billed-to{
flex: 0 1 50%;
}
}
}
&__table {
display: flex;
flex-direction: column;
margin-bottom: 60px;
table {
font-size: 15px;
color: #000;
border-top: 2px solid #000;
text-align: left;
thead th,
tbody tr td {
margin-bottom: 15px;
background: transparent;
}
thead{
tr {
color: #000;
}
}
thead th {
font-size: 16px;
font-weight: 400;
border-bottom: none;
padding: 10px;
&:first-child{
padding-left: 0;
}
&:last-child{
padding-right: 0;
}
}
tbody tr td {
font-size: 15px;
padding: 10px;
border-bottom: 1px solid #cecbcb;
&:first-child{
padding-left: 0;
}
&::last-child{
padding-right: 0;
}
}
thead tr th{
&.item{
width: 45%;
}
&.rate{
width: 18%;
}
&.quantity{
width: 16%;
}
&.total{
width: 21%;
}
}
}
}
&__conditions{
&__title{
color: #666;
}
}
}
-147
View File
@@ -1,147 +0,0 @@
@import "../layouts/paper-layout.scss";
.invoice{
text-align: left;
padding: 45px 40px;
&__header{
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 0 60px;
.organization{
.title{
margin: 0 0 10px;
}
}
.paper{
.title{
font-weight: 400;
text-transform: uppercase;
margin: 0 0 6px;
font-size: 26px;
}
}
}
&__meta{
display: flex;
flex-wrap: wrap;
margin-bottom: 40px;
&-item{
flex: 0 1 25%;
padding-right: 10px;
font-size: 16px;
font-weight: 400;
line-height: 1.6rem;
margin-bottom: 20px;
display: flex;
flex-direction: column;
.value{
color: #000;
}
.label{
color: #555;
margin-bottom: 2px;
}
&--amount{
flex: 0 1 50%;
.value{
font-weight: bold;
font-size: 20px;
}
}
&--billed-to{
flex: 0 1 50%;
}
}
}
&__table {
display: flex;
flex-direction: column;
margin-bottom: 60px;
table {
font-size: 15px;
color: #000;
text-align: left;
thead th,
tbody tr td {
margin-bottom: 15px;
background: transparent;
}
thead{
tr {
color: #000;
th{
border-top: 2px solid #000;
}
}
}
thead th {
font-size: 16px;
font-weight: 400;
border-bottom: none;
padding: 10px;
&:first-child{
padding-left: 0;
}
&:last-child{
padding-right: 0;
}
}
tbody tr td {
font-size: 15px;
padding: 10px;
border-bottom: 1px solid #cecbcb;
&:first-child{
padding-left: 0;
}
&::last-child{
padding-right: 0;
}
}
thead tr th{
&.item{
width: 45%;
}
&.rate{
width: 18%;
}
&.quantity{
width: 16%;
}
&.total{
width: 21%;
}
}
.description{
font-size: 14px;
color: #666;
}
}
}
&__conditions{
&__title{
color: #666;
}
}
}
-140
View File
@@ -1,140 +0,0 @@
@import "../layouts/paper-layout.scss";
.receipt{
text-align: left;
padding: 45px;
&__header{
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 0 60px;
.organization{
.title{
margin: 0 0 10px;
}
}
.paper{
.title{
font-weight: 400;
text-transform: uppercase;
margin: 0 0 6px;
font-size: 26px;
}
}
}
&__meta{
display: flex;
flex-wrap: wrap;
margin-bottom: 40px;
&-item{
flex: 0 1 25%;
padding-right: 10px;
font-size: 16px;
font-weight: 400;
line-height: 1.6rem;
margin-bottom: 20px;
display: flex;
flex-direction: column;
.value{
color: #000;
}
.label{
color: #555;
margin-bottom: 2px;
}
&--amount{
flex: 0 1 50%;
.value{
font-weight: bold;
font-size: 20px;
}
}
&--billed-to{
flex: 0 1 50%;
}
}
}
&__table {
display: flex;
flex-direction: column;
margin-bottom: 60px;
table {
font-size: 15px;
color: #000;
border-top: 2px solid #000;
text-align: left;
thead th,
tbody tr td {
margin-bottom: 15px;
background: transparent;
}
thead{
tr {
color: #000;
}
}
thead th {
font-size: 16px;
font-weight: 400;
border-bottom: none;
padding: 10px;
&:first-child{
padding-left: 0;
}
&:last-child{
padding-right: 0;
}
}
tbody tr td {
font-size: 15px;
padding: 10px;
border-bottom: 1px solid #cecbcb;
&:first-child{
padding-left: 0;
}
&::last-child{
padding-right: 0;
}
}
thead tr th{
&.item{
width: 45%;
}
&.rate{
width: 18%;
}
&.quantity{
width: 16%;
}
&.total{
width: 21%;
}
}
}
}
&__conditions{
&__title{
color: #666;
}
}
}

Some files were not shown because too many files have changed in this diff Show More