Skip to content

Commit

Permalink
run dev env for site in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
akellbl4 committed Jul 25, 2022
1 parent f104a6e commit 87e88e5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions site/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:16-alpine as build

WORKDIR /site
COPY ./ /site
RUN yarn --frozen-lockfile

CMD yarn start
6 changes: 4 additions & 2 deletions site/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ services:
volumes:
- ./build:/site/build

# Runs dev evn for the site
server:
image: remark42-site
build: .
command: yarn dev
build:
dockerfile: Dockerfile.dev
context: .

logging:
driver: json-file
Expand Down
5 changes: 3 additions & 2 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
"yarn": ">=1.22"
},
"scripts": {
"dev": "npm-run-all -l clean -p dev:css dev:11ty",
"start": "npm-run-all dev",
"dev": "npm-run-all -l clean build:css -p dev:css dev:11ty",
"dev:css": "tailwindcss -i ./src/styles.css -o .tmp/style.css -w",
"dev:11ty": "eleventy --serve --watch --quiet",
"build": "cross-env NODE_ENV=production run-s clean build:* --print-label",
"build": "cross-env NODE_ENV=production run-s clean build:css build:11ty --print-label",
"build:css": "tailwindcss -i ./src/styles.css -o .tmp/style.css",
"build:11ty": "eleventy",
"clean": "rm -rf .tmp/* build/*"
Expand Down

0 comments on commit 87e88e5

Please sign in to comment.