Skip to content

Commit 75aaad4

Browse files
committed
Preliminary docker setup for development
1 parent 580ea40 commit 75aaad4

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

Dockerfile.dev

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM node:18.13.0-buster-slim
2+
3+
WORKDIR /app
4+
5+
RUN chown -R node:node /app
6+
7+
COPY --chown=node:node package.json .
8+
COPY --chown=node:node package-lock.json .
9+
10+
USER node
11+
12+
RUN npm i --legacy-peer-deps
13+
14+
EXPOSE 8000
15+
16+
CMD ["npm", "run", "develop"]

docker-compose.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: "3"
2+
3+
services:
4+
dev:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile.dev
8+
volumes:
9+
- .:/app # Links the source files to the running container
10+
ports:
11+
- "8000:8000"

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
},
5353
"scripts": {
5454
"build": "gatsby build",
55-
"develop": "gatsby develop",
55+
"develop": "gatsby develop -H 0.0.0.0",
5656
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
5757
"start": "npm run develop",
5858
"serve": "gatsby serve",

0 commit comments

Comments
 (0)