Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

ci(docker): changes to dockerfile to make builds faster

Amruth Pillai00505a9e5dac
diff --git a/.dockerignore b/.dockerignore
index bf782ea6c..050245347 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -2,3 +2,4 @@ dist
Dockerfile
node_modules
.dockerignore
+docker-compose.yml
diff --git a/.npmrc b/.npmrc
deleted file mode 100644
index b6f27f135..000000000
--- a/.npmrc
+++ /dev/null
@@ -1 +0,0 @@
-engine-strict=true
diff --git a/Dockerfile b/Dockerfile
index 98ee588c6..21d1bd41d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,9 +4,7 @@ RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
WORKDIR /app
-COPY .npmrc package.json pnpm-lock.yaml ./
-
-ENV HUSKY 0
+COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
@@ -20,12 +18,9 @@ RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
WORKDIR /app
-COPY --from=builder /app/package.json .
-COPY --from=builder /app/pnpm-lock.yaml .
+COPY --from=builder /app/package.json /app/pnpm-lock.yaml ./
COPY --from=builder /app/dist ./dist
-ENV HUSKY 0
-
RUN pnpm install --frozen-lockfile --prod
# Expose App
diff --git a/docker-compose.yml b/docker-compose.yml
index 28d214592..395050246 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -12,22 +12,8 @@ services:
- pgdata:/var/lib/postgresql/data
# Development
- app:
- build: .
- container_name: app
- links:
- - postgres
- ports:
- - 3000:3000
- - 3100:3100
- env_file: .env
- environment:
- NODE_ENV: development
- POSTGRES_HOST: postgres
-
- # Production
# app:
- # image: amruthpillai/reactive-resume
+ # build: .
# container_name: app
# links:
# - postgres
@@ -36,8 +22,22 @@ services:
# - 3100:3100
# env_file: .env
# environment:
- # NODE_ENV: production
+ # NODE_ENV: development
# POSTGRES_HOST: postgres
+ # Production
+ app:
+ image: reactive-resume
+ container_name: app
+ links:
+ - postgres
+ ports:
+ - 3000:3000
+ - 3100:3100
+ env_file: .env
+ environment:
+ NODE_ENV: production
+ POSTGRES_HOST: postgres
+
volumes:
pgdata: