Refactor the production Docker image
This commit is contained in:
parent
54507c2d74
commit
1e66df30a1
6 changed files with 27 additions and 33 deletions
21
tools/docker/images/Dockerfile
Normal file
21
tools/docker/images/Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
|||
FROM opdavies/sculpin-serve AS app
|
||||
WORKDIR /app
|
||||
COPY composer.* ./
|
||||
RUN composer install
|
||||
COPY app app
|
||||
COPY source source
|
||||
RUN sculpin generate -e prod
|
||||
|
||||
FROM node:14 AS assets
|
||||
WORKDIR /node
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run production
|
||||
|
||||
FROM nginx AS nginx
|
||||
COPY tools/docker/images/nginx/root /
|
||||
WORKDIR /app
|
||||
COPY --from=app /app/output_prod ./
|
||||
COPY --from=assets /node/source/build build
|
|
@ -1,2 +0,0 @@
|
|||
FROM nginx:1 as base
|
||||
COPY tools/docker/images/nginx/root /
|
|
@ -603,4 +603,3 @@ server {
|
|||
rewrite ^/wp-tailwind-static$ https://wp-tailwind.oliverdavies.uk;
|
||||
rewrite ^/yXhoS$ /talks/things-you-should-know-about-php;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
FROM node:14 AS base
|
||||
WORKDIR /node
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
Loading…
Add table
Add a link
Reference in a new issue