cfahlgren1 HF Staff commited on
Commit
36e99f7
·
1 Parent(s): d914d0d

update dockerfile

Browse files
Files changed (3) hide show
  1. Dockerfile +3 -1
  2. docker-compose.yml +14 -0
  3. pages/index.md +1 -1
Dockerfile CHANGED
@@ -4,7 +4,7 @@ WORKDIR /app
4
 
5
  COPY package*.json ./
6
 
7
- RUN npm install
8
 
9
  COPY . .
10
 
@@ -12,4 +12,6 @@ RUN npm run build
12
 
13
  EXPOSE 3000
14
 
 
 
15
  CMD ["npm", "run", "preview"]
 
4
 
5
  COPY package*.json ./
6
 
7
+ RUN npm ci --only=production
8
 
9
  COPY . .
10
 
 
12
 
13
  EXPOSE 3000
14
 
15
+ ENV NODE_ENV=production
16
+
17
  CMD ["npm", "run", "preview"]
docker-compose.yml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.8'
2
+
3
+ services:
4
+ app:
5
+ build:
6
+ context: .
7
+ dockerfile: Dockerfile
8
+ ports:
9
+ - "3000:3000"
10
+ volumes:
11
+ - .:/app
12
+ - /app/node_modules
13
+ environment:
14
+ - NODE_ENV=production
pages/index.md CHANGED
@@ -35,7 +35,7 @@ GROUP BY month, repo
35
  ORDER BY month, repo
36
  ```
37
 
38
- <AreaChart
39
  data={hub_growth}
40
  x=month
41
  y=creations
 
35
  ORDER BY month, repo
36
  ```
37
 
38
+ <BarChart
39
  data={hub_growth}
40
  x=month
41
  y=creations