Skip to content

Commit

Permalink
chore(#181): add Lagoon and docker files (#182)
Browse files Browse the repository at this point in the history
* chore(#181): add Lagoon and docker files

* chore(#182): add docs build step

* chore(#181): remove old tasks
  • Loading branch information
Decipher authored Aug 31, 2021
1 parent 30b3be3 commit 5853687
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
version: 2.1

orbs:
gh-pages: sugarshin/[email protected]

defaults: &defaults
working_directory: ~/repo
docker:
Expand Down Expand Up @@ -39,25 +36,6 @@ jobs:
paths:
- .

# TODO - Fix CI Docs build.
# build_docs:
# <<: *defaults
# steps:
# - attach_workspace:
# at: ~/repo

# - run:
# name: Build with DruxtJS Docgen
# command: npm run docs:build

# - store_artifacts:
# path: ~/repo/docs/.vuepress/dist

# - persist_to_workspace:
# root: ~/repo
# paths:
# - .

test:
<<: *defaults
steps:
Expand Down Expand Up @@ -102,9 +80,6 @@ workflows:
test_deploy:
jobs:
- build
# - build_docs:
# requires:
# - build
- test:
requires:
- build
Expand All @@ -115,11 +90,3 @@ workflows:
# filters:
# branches:
# only: master
# - gh-pages/deploy:
# build-dir: ../repo/docs/.vuepress/dist
# requires:
# - build_docs
# ssh-fingerprints: "c9:f9:e5:7d:4f:b2:5e:1e:f1:9a:5e:eb:47:91:10:b8"
# filters:
# branches:
# only: master
1 change: 1 addition & 0 deletions .lagoon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker-compose-yaml: ./docker-compose.yml
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '2.3'

x-lagoon-project:
&lagoon-project druxtjs-org

x-environment:
&default-environment
LAGOON_PROJECT: *lagoon-project

services:
app:
build:
context: .
dockerfile: ./docs/Dockerfile
labels:
lagoon.type: node
ports:
- "3000:3000"
19 changes: 19 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM amazeeio/node:14-builder as builder

# Build source files.
COPY . /app/
RUN yarn
RUN yarn build
RUN yarn build:docs

# Build static files.
FROM amazeeio/node:14
COPY --from=builder /app/docs /app

RUN yarn
RUN yarn generate

ENV HOST 0.0.0.0
EXPOSE 3000

CMD ["yarn", "start"]

0 comments on commit 5853687

Please sign in to comment.