1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-08 15:05:26 +02:00

Implement development docker support

This commit is contained in:
N0str 2020-04-20 00:04:05 +03:00
parent c0a4f6f3fd
commit c6534ff996
No known key found for this signature in database
GPG key ID: 9141CB6BB5A35140
2 changed files with 30 additions and 0 deletions

14
docker-compose.dev.yml Normal file
View file

@ -0,0 +1,14 @@
version: "3.2"
services:
docs:
build:
dockerfile: "docker/Dockerfile.dev"
context: .
user: "node"
volumes:
- ./:/usr/src/app
- /usr/src/app/node_modules
ports:
- "3000:3000"
stdin_open: true
tty: true

16
docker/Dockerfile.dev Normal file
View file

@ -0,0 +1,16 @@
FROM node:10-alpine as builder
WORKDIR /usr/src/app
RUN apk add --no-cache git gcc g++ python make musl-dev
COPY package.json yarn.lock ./
RUN yarn install
FROM node:10-alpine
WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/node_modules ./node_modules
CMD ["yarn", "start:dev"]