-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
solazio
committed
Apr 23, 2020
1 parent
6e4302f
commit a2cffda
Showing
42 changed files
with
5,115 additions
and
1,271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
PORT=8037 | ||
FLASK_DEBUG=true | ||
SECRET_KEY=local_development_fake_key | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module.exports = { | ||
parser: "babel-eslint", | ||
globals: {}, | ||
env: { | ||
browser: true, | ||
es6: true | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
parserOptions: { | ||
sourceType: "module", | ||
}, | ||
rules: { | ||
"linebreak-style": ["error", "unix"], | ||
semi: ["error", "always"], | ||
"object-curly-spacing": ["error", "always"] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## Done | ||
|
||
[List of work items including drive-bys] | ||
|
||
## QA | ||
|
||
- Check out this feature branch | ||
- Run the site using the command `./run serve` | ||
- View the site locally in your web browser at: http://0.0.0.0:8037 | ||
- Run through the following [QA steps](https://canonical-web-and-design.github.io/practices/workflow/qa-steps.html) | ||
- [List additional steps to QA the new features or prove the bug has been resolved] | ||
|
||
|
||
## Issue / Card | ||
|
||
Fixes # | ||
|
||
## Screenshots | ||
|
||
[if relevant, include a screenshot] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,21 @@ | ||
# syntax=docker/dockerfile:experimental | ||
|
||
# Build stage: Install ruby dependencies | ||
# === | ||
FROM ruby:2.5 AS build-site | ||
WORKDIR /srv | ||
ADD . . | ||
RUN bundle install | ||
RUN bundle exec jekyll build | ||
|
||
# Build stage: Install yarn dependencies | ||
# === | ||
FROM node:12-slim AS yarn-dependencies | ||
WORKDIR /srv | ||
ADD package.json . | ||
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn yarn install | ||
|
||
# Build stage: Run "yarn run build-js" | ||
# === | ||
FROM yarn-dependencies AS build-js | ||
WORKDIR /srv | ||
COPY . . | ||
RUN yarn run build-js | ||
|
||
# Build stage: Run "yarn run build-css" | ||
# === | ||
FROM yarn-dependencies AS build-css | ||
WORKDIR /srv | ||
COPY . . | ||
RUN yarn run build-css | ||
|
||
# Build the production image | ||
# === | ||
FROM ubuntu:focal | ||
FROM ubuntu:bionic | ||
|
||
# Set up environment | ||
ENV LANG C.UTF-8 | ||
WORKDIR /srv | ||
|
||
# Install nginx | ||
RUN apt-get update && apt-get install --no-install-recommends --yes nginx | ||
|
||
# Import code, build assets and mirror list | ||
RUN rm -rf package.json yarn.lock .babelrc webpack.config.js Gemfile.lock nginx.conf | ||
COPY --from=build-site srv/_site . | ||
COPY --from=build-css srv/css css | ||
COPY --from=build-js srv/js js | ||
# System dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-setuptools python3-pip | ||
|
||
ARG BUILD_ID | ||
ADD nginx.conf /etc/nginx/sites-enabled/default | ||
RUN sed -i "s/~BUILD_ID~/${BUILD_ID}/" /etc/nginx/sites-enabled/default | ||
|
||
STOPSIGNAL SIGTERM | ||
|
||
CMD ["nginx", "-g", "daemon off;"] | ||
# Set git commit ID | ||
ARG COMMIT_ID | ||
ENV COMMIT_ID "${COMMIT_ID}" | ||
ENV TALISKER_REVISION_ID "${COMMIT_ID}" | ||
|
||
# Import code, install code dependencies | ||
COPY . . | ||
RUN python3 -m pip install --no-cache-dir -r requirements.txt | ||
|
||
# Setup commands to run server | ||
ENTRYPOINT ["./entrypoint"] | ||
CMD ["0.0.0.0:80"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.