mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
Dockefile conf updated cache. Created other conf for dockerisation.
This commit is contained in:
parent
14cebeebe5
commit
c09588dacd
14
.dockerignore
Normal file
14
.dockerignore
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Ignore node modules as they will be installed in the Dockerfile
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Ignore local configuration and cache files
|
||||||
|
.cache/
|
||||||
|
.config/
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Ignore logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Ignore test and development files
|
||||||
|
*.md
|
||||||
|
*.test.js
|
@ -1,8 +1,14 @@
|
|||||||
# Builder
|
# Builder
|
||||||
FROM node:18-alpine as builder
|
FROM node:18-alpine as builder
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
|
# Cache dependencies first
|
||||||
|
COPY package.json yarn.lock ./
|
||||||
|
RUN yarn install --frozen-lockfile
|
||||||
|
|
||||||
|
# Copy other files and build
|
||||||
COPY . /src/
|
COPY . /src/
|
||||||
RUN yarn install --frozen-lockfile && yarn build
|
RUN yarn build
|
||||||
|
|
||||||
# App
|
# App
|
||||||
FROM nginxinc/nginx-unprivileged
|
FROM nginxinc/nginx-unprivileged
|
||||||
|
@ -74,9 +74,12 @@ If you want to run JSON Crack locally:
|
|||||||
# Build a Docker image with:
|
# Build a Docker image with:
|
||||||
docker build -t jsoncrack .
|
docker build -t jsoncrack .
|
||||||
|
|
||||||
# Run locally with:
|
# Run locally with `docker run`
|
||||||
docker run -p 8888:8080 jsoncrack
|
docker run -p 8888:8080 jsoncrack
|
||||||
|
|
||||||
|
# Run locally with `docker-compose`
|
||||||
|
docker-compose up -d
|
||||||
|
|
||||||
# Go to http://localhost:8888
|
# Go to http://localhost:8888
|
||||||
```
|
```
|
||||||
|
|
||||||
|
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
jsoncrack:
|
||||||
|
image: jsoncrack
|
||||||
|
container_name: jsoncrack
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- "8888:8080"
|
Loading…
x
Reference in New Issue
Block a user