Skip to content

Commit

Permalink
Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ceddybi committed May 28, 2019
1 parent 02dbd9f commit 4fe21cc
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.git
node_modules
build
.next

25 changes: 11 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
FROM node:10.15.1-alpine
FROM mhart/alpine-node:10 AS builder

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
WORKDIR /srv

COPY package.json yarn.lock /usr/src/app/
RUN YARN_CACHE_FOLDER=/dev/shm/yarn_cache yarn --production
ENV NODE_ICU_DATA=/usr/src/app/node_modules/full-icu

COPY .next /usr/src/app/.next
COPY locales /usr/src/app/locales
COPY build /usr/src/app/build
COPY src/static /usr/src/app/build/static
COPY ./ ./
# RUN apk add --no-cache make gcc g++ python
RUN yarn
RUN yarn build

# use lighter image
FROM mhart/alpine-node:base-10
COPY --from=builder /srv .
ENV NODE_ENV=production
EXPOSE 3000
CMD ["node", "build/server.js"]

USER node

CMD [ "yarn", "start" ]
2 changes: 1 addition & 1 deletion src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default class MyDocument extends Document<{
/>
)} */}
</InlineStylesHead>
<body className="container">
<body>
<div className="next-main">
<Main />
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/screens/Ats/AtsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import Head from "next/head";
import styled from "styled-components";
import dynamic from "next/dynamic";
import { SEO } from "./SEO";

const GitHubButton = dynamic(import("react-github-btn"), {
ssr: false,
Expand All @@ -17,9 +18,10 @@ const GitHubContainer = styled.div`

export const AtsScreen = () => {
return (
<div>
<div className="container">
{/* Inject CSS files */}
<Head>
<SEO />
<link href="/static/css/app.css" rel="stylesheet" />
<link href="/static/css/moving-stars.css" rel="stylesheet" />
<link href="/static/css/shooting-stars.css" rel="stylesheet" />
Expand Down
9 changes: 9 additions & 0 deletions src/screens/Ats/SEO.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React, { Fragment } from "react";

export const SEO = () => {
return (
<Fragment>
<title> Create your own internet </title>
</Fragment>
);
};
2 changes: 1 addition & 1 deletion src/static/css/moving-stars.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: block;
position: relative;
width: 100%;
height: 100%;
height: 100vh;
overflow: hidden;
background: linear-gradient(to bottom, #020107 0%, #201b46 100%);
}
Expand Down

0 comments on commit 4fe21cc

Please sign in to comment.