Skip to content

Commit 0fd7a35

Browse files
committedNov 5, 2019
Add dockerfile
1 parent 1e2d0e1 commit 0fd7a35

15 files changed

+139
-121
lines changed
 

‎.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
application/node_modules
2+
application/yarn-debug.log

‎.gitignore

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
# compiled output
2-
app/dist
3-
app/node_modules
2+
application/dist
3+
application/node_modules
44
bootstrap-sncf
55
assets
66
generate
77

88
# Logs
9-
app/logs
10-
app/*.log
11-
app/npm-debug.log*
12-
app/yarn-debug.log*
13-
app/yarn-error.log*
14-
app/lerna-debug.log*
9+
application/logs
10+
application/*.log
11+
application/npm-debug.log*
12+
application/yarn-debug.log*
13+
application/yarn-error.log*
14+
application/lerna-debug.log*
1515

1616
# OS
1717
.DS_Store
1818

1919
# Tests
20-
app/coverage
21-
app/.nyc_output
20+
application/coverage
21+
application/.nyc_output
2222

2323
# IDEs and editors
2424
/.idea
@@ -34,4 +34,4 @@ app/.nyc_output
3434
!.vscode/settings.json
3535
!.vscode/tasks.json
3636
!.vscode/launch.json
37-
!.vscode/extensions.json
37+
!.vscode/extensions.json

‎Dockerfile

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:10
2+
3+
WORKDIR /usr/src/app
4+
5+
COPY application/package.json ./
6+
COPY application/yarn.lock ./
7+
8+
RUN yarn install --ignore-engines
9+
10+
COPY application .
11+
12+
RUN yarn build
13+
14+
EXPOSE 3000
15+
CMD [ "yarn", "start:prod" ]

‎README.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
11
# icon-builder-sncf
22

3-
## Requirements
3+
## Docker build
4+
5+
```bash
6+
$ docker build -t sncf/fonticon .
7+
$ docker run -p 49160:3000 -d sncf/fonticon
8+
```
9+
10+
## Local build
11+
12+
### Requirements
413

514
- `yarn 1.17.3`
615
- `node v10.15.3`
716
- `git 2.16.2`
817

9-
## Installation
18+
### Installation
1019

1120
```bash
12-
$ cd app
21+
$ cd application
1322
$ yarn install
1423
$ yarn svg
1524
```
1625

17-
## How to build
26+
### How to build
1827

1928
First steps, install dependencies, go inside icon-builder-sncf directory, then :
2029

2130
1. `yarn install` to install Node.js dependencies.
2231
2. `yarn svg` to get bootstrap-sncf icons library.
2332

24-
### Running documentation locally
33+
### Running documentation
2534

2635
```bash
2736
# development
2837
$ yarn build
2938

3039
# watch mode
3140
$ yarn start:dev
32-
33-
# production mode
34-
$ start:prod
3541
```
3642

3743
## API
3844

39-
Download assets : `http://0.0.0.0:3000/api/download` with body params.
45+
Download assets : `http://x.x.x.x:3000/api/download` with body params.
4046
Today we have:
4147

4248
| Plugin | Description |
@@ -46,4 +52,4 @@ Today we have:
4652
| png | Boolean |
4753
| svg | Boolean |
4854
| color | Hexa |
49-
| size | Number |
55+
| size | Number |
File renamed without changes.
File renamed without changes.

‎app/package.json ‎application/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "",
66
"license": "MIT",
77
"scripts": {
8-
"build": "rimraf dist && svg && tsc -p tsconfig.build.json",
8+
"build": "rimraf dist && yarn svg && tsc -p tsconfig.build.json",
99
"format": "prettier --write \"src/**/*.ts\"",
1010
"start": "ts-node -r tsconfig-paths/register src/main.ts",
1111
"start:dev": "tsc-watch -p tsconfig.build.json --onSuccess \"node dist/main.js\"",
@@ -33,7 +33,7 @@
3333
"replace-in-file": "^4.1.3",
3434
"rimraf": "^2.6.2",
3535
"rxjs": "^6.3.3",
36-
"sharp": "^0.23.0",
36+
"sharp": "^0.23.2",
3737
"simple-git": "^1.126.0",
3838
"webfonts-generator": "^0.4.0"
3939
},
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)