Skip to content
This repository was archived by the owner on Nov 21, 2020. It is now read-only.

Commit 74ad5b0

Browse files
author
batamar
committed
Merge branch 'develop'
2 parents bf071fa + 1058259 commit 74ad5b0

File tree

247 files changed

+8991
-4291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+8991
-4291
lines changed

.dockerignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
.git
12
.gitignore
23
*.md
3-
scripts
44
*.yml
5-
initialData
5+
scripts
6+
.snyk

.drone.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,38 @@ pipeline:
1515
- yarn install
1616

1717
linting:
18-
image: node:8-slim
18+
image: erxes/runner:latest
1919
commands:
2020
- yarn lint
2121

2222
typescript:
23-
image: node:8-slim
23+
image: erxes/runner:latest
2424
commands:
2525
- yarn tsc
2626

2727
testing:
28-
image: node:8-slim
28+
image: erxes/runner:latest
2929
environment:
3030
- TEST_MONGO_URL=mongodb://mongo/test
3131
commands:
32+
- mkdir src/private/xlsTemplateOutputs
3233
- yarn test
3334

34-
publish:
35-
image: plugins/docker
36-
repo: goharbor.erxes.io/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
37-
registry: goharbor.erxes.io
38-
dockerfile: Dockerfile.local
39-
secrets: [ docker_username, docker_password ]
40-
tags:
41-
- ${DRONE_BRANCH}-latest
35+
build:
36+
image: erxes/runner:latest
37+
commands:
38+
- yarn build
39+
- cp .env.sample .env
4240
when:
43-
branch: [ develop ]
41+
branch: [master, develop]
4442
event: push
4543
status: success
4644

4745
docker:
4846
image: plugins/docker
4947
repo: ${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
50-
dockerfile: Dockerfile.local
48+
dockerfile: Dockerfile
49+
custom_dns: 8.8.8.8
5150
secrets:
5251
- source: docker_hub_username
5352
target: docker_username
@@ -56,11 +55,11 @@ pipeline:
5655
tags:
5756
- ${DRONE_BRANCH}-latest
5857
when:
59-
branch: [ develop, master ]
58+
branch: [master, develop]
6059
event: push
6160
status: success
6261

6362
services:
6463
mongo:
65-
image: mongo:3.4.4
66-
command: [ --smallfiles ]
64+
image: mongo:3.6
65+
command: [--smallfiles]

.env.sample

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
1-
NODE_ENV=development
2-
PORT=3300
3-
1+
# MongoDB
42
MONGO_URL=mongodb://localhost/erxes
3+
TEST_MONGO_URL=mongodb://localhost/test
54

65
# Set this variables as True if you are using replication set
76
# in MONGO_URL which means Collection.watch method works as
87
# expected and can send notification
98
USE_REPLICATION=false
109

11-
TEST_MONGO_URL=mongodb://localhost/test
12-
10+
# Redis
1311
REDIS_HOST=localhost
1412
REDIS_PORT=6379
1513
REDIS_PASSWORD=
1614

15+
# erxes-api
1716
HTTPS=false
18-
1917
MAIN_APP_DOMAIN=http://localhost:3000
20-
2118
# Using this config to upload file directly from widgets in cors origins
2219
WIDGETS_DOMAIN=http://localhost:3200
23-
2420
DOMAIN=http://localhost:3300
21+
MAX_IMPORT_SIZE=600
22+
NODE_ENV=development
23+
PORT=3300
2524

25+
# Email
2626
COMPANY_EMAIL_FROM=[email protected]
27-
2827
DEFAULT_EMAIL_SERVICE=sendgrid
2928
MAIL_SERVICE=sendgrid
3029
MAIL_PORT=''
3130
MAIL_USER=''
3231
MAIL_PASS=''
32+
MAIL_HOST=''
3333

34+
# Twitter
3435
TWITTER_CONSUMER_KEY=''
3536
TWITTER_CONSUMER_SECRET=''
3637
TWITTER_REDIRECT_URL=''
3738

39+
# Aws S3
3840
AWS_ACCESS_KEY_ID=''
3941
AWS_SECRET_ACCESS_KEY=''
4042
AWS_BUCKET=''
4143
AWS_PREFIX=''
4244

45+
# Aws SES
4346
AWS_SES_ACCESS_KEY_ID=''
4447
AWS_SES_SECRET_ACCESS_KEY=''
4548
AWS_SES_CONFIG_SET=''
46-
4749
AWS_REGION=''
4850
AWS_ENDPOINT=''
4951

52+
# Facebook
5053
FACEBOOK_APP_ID=''
5154
FACEBOOK_APP_SECRET=''
5255
FACEBOOK_PERMISSIONS='manage_pages, pages_show_list, pages_messaging, publish_pages, pages_messaging_phone_number, pages_messaging_subscriptions'
5356

54-
MAX_IMPORT_SIZE=600
55-
57+
# Gmail
5658
GOOGLE_CLIENT_ID=''
5759
GOOGLE_CLIENT_SECRET=''
58-
GOOGLE_REDIRECT_URI=''
5960
GOOGLE_APPLICATION_CREDENTIALS=''
6061
GOOGLE_TOPIC=''
61-
GOOGLE_SUPSCRIPTION_NAME=''
62+
GOOGLE_SUBSCRIPTION_NAME=''
6263
GOOGLE_PROJECT_ID=''
63-
6464
GMAIL_REDIRECT_URL = http://localhost:3300/
6565

6666
ERXES_PATH=''

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ dump.rdb
1010
*.un~
1111
*.swp
1212
*.swo
13-
.migrate
13+
.migrate

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 120,
3+
"singleQuote": true,
4+
"trailingComma": "all"
5+
}

Dockerfile

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
FROM erxes/runner:latest as build-deps
1+
FROM erxes/runner:latest
22
WORKDIR /erxes-api/
3-
COPY package.json yarn.lock ./
4-
RUN yarn
5-
COPY . .
6-
RUN cp .env.sample .env
7-
RUN yarn build
8-
RUN mkdir /erxes-api/prod
9-
RUN rsync -a /erxes-api/dist /erxes-api/prod/ && \
10-
rsync -a /erxes-api/node_modules /erxes-api/prod/ && \
11-
rsync /erxes-api/package.json /erxes-api/prod/ && \
12-
rsync /erxes-api/.env.sample /erxes-api/prod/.env
13-
14-
FROM node:8-slim
15-
WORKDIR /erxes-api/
16-
COPY --from=build-deps /erxes-api/prod /erxes-api
3+
COPY . /erxes-api
174
RUN chown -R node:node /erxes-api
185
USER node
196
EXPOSE 3300

Dockerfile.dev

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM erxes/runner
2+
WORKDIR /erxes-api
3+
COPY yarn.lock package.json ./
4+
RUN yarn install
5+
CMD ["yarn", "dev"]

Dockerfile.local

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"erxes.activity_logs"}]}
1+
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"erxes.activity_logs"}],"uuid":"475cbddb84ce4a8b90d3cfad816f01db"}

initialData/brands.metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"erxes.brands"}]}
1+
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"erxes.brands"}],"uuid":"f2489825947d47918b5c80dafc344e48"}

0 commit comments

Comments
 (0)