mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-26 22:36:01 +03:00
Fixed failing Dockerfile (openssl3 + prisma).
This commit is contained in:
parent
ce31d940ac
commit
6ba114ecbe
6
.github/workflows/ci.yaml
vendored
6
.github/workflows/ci.yaml
vendored
@ -73,7 +73,7 @@ jobs:
|
|||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
|
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
|
||||||
# TODO: Right now, actions/cache updates cache only if cache was not fetched.
|
# TODO: Right now, actions/cache updates cache only if cache was not fe
|
||||||
# This is not ideal for us, because we would ideally update cache even if it
|
# This is not ideal for us, because we would ideally update cache even if it
|
||||||
# was fetched, because we want to cache any newly installed packages.
|
# was fetched, because we want to cache any newly installed packages.
|
||||||
# This was working normally on Travis and Appveyor.
|
# This was working normally on Travis and Appveyor.
|
||||||
@ -104,6 +104,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '18'
|
||||||
|
|
||||||
|
- name: On MacOS, skip e2e tests with Docker since it is not installed
|
||||||
|
if: matrix.os == 'macos-latest'
|
||||||
|
run: export WASP_E2E_TESTS_SKIP_DOCKER=1
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cabal test
|
run: cabal test
|
||||||
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
{{={= =}=}}
|
{{={= =}=}}
|
||||||
FROM node:{= nodeMajorVersion =}-alpine AS node
|
# NOTE: Why do we specify alpine version here?
|
||||||
|
# Because if not, we had situations where it would use the different version
|
||||||
|
# locally and on Github CI. This way we ensure exact version is used,
|
||||||
|
# and also have control over updating it (instead of update surprising us).
|
||||||
|
FROM node:{= nodeMajorVersion =}-alpine3.17 AS node
|
||||||
|
|
||||||
|
|
||||||
FROM node AS base
|
FROM node AS base
|
||||||
@ -7,8 +11,11 @@ RUN apk --no-cache -U upgrade # To ensure any potential security patches are app
|
|||||||
|
|
||||||
|
|
||||||
FROM base AS server-builder
|
FROM base AS server-builder
|
||||||
# Install packages needed to build native npm packages.
|
|
||||||
RUN apk add --no-cache build-base libtool autoconf automake python3
|
RUN apk add --no-cache build-base libtool autoconf automake python3
|
||||||
|
# TODO: Remove line below (installation of openssl 1.1) once Prisma adds support for
|
||||||
|
# openssl 3 on alpine. Alpine >= 3.17 has openssl 3 as default.
|
||||||
|
# Relevant GH issue: https://github.com/wasp-lang/wasp/issues/877
|
||||||
|
RUN apk add --no-cache openssl1.1-compat
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# Install npm packages, resulting in node_modules/.
|
# Install npm packages, resulting in node_modules/.
|
||||||
{=# usingServerPatches =}
|
{=# usingServerPatches =}
|
||||||
|
@ -14,6 +14,7 @@ module ShellCommands
|
|||||||
waspCliCompile,
|
waspCliCompile,
|
||||||
waspCliMigrate,
|
waspCliMigrate,
|
||||||
waspCliBuild,
|
waspCliBuild,
|
||||||
|
dockerBuild,
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
@ -105,3 +106,8 @@ waspCliMigrate migrationName =
|
|||||||
|
|
||||||
waspCliBuild :: ShellCommandBuilder ShellCommand
|
waspCliBuild :: ShellCommandBuilder ShellCommand
|
||||||
waspCliBuild = return "wasp-cli build"
|
waspCliBuild = return "wasp-cli build"
|
||||||
|
|
||||||
|
dockerBuild :: ShellCommandBuilder ShellCommand
|
||||||
|
dockerBuild =
|
||||||
|
return
|
||||||
|
"[ -z \"$WASP_E2E_TESTS_SKIP_DOCKER\" ] && cd .wasp/build && docker build . && cd ../.. || true"
|
||||||
|
@ -3,6 +3,7 @@ module Tests.WaspBuildTest (waspBuild) where
|
|||||||
import GoldenTest (GoldenTest, makeGoldenTest)
|
import GoldenTest (GoldenTest, makeGoldenTest)
|
||||||
import ShellCommands
|
import ShellCommands
|
||||||
( cdIntoCurrentProject,
|
( cdIntoCurrentProject,
|
||||||
|
dockerBuild,
|
||||||
setDbToPSQL,
|
setDbToPSQL,
|
||||||
waspCliBuild,
|
waspCliBuild,
|
||||||
waspCliNew,
|
waspCliNew,
|
||||||
@ -15,5 +16,6 @@ waspBuild =
|
|||||||
[ waspCliNew,
|
[ waspCliNew,
|
||||||
cdIntoCurrentProject,
|
cdIntoCurrentProject,
|
||||||
setDbToPSQL,
|
setDbToPSQL,
|
||||||
waspCliBuild
|
waspCliBuild,
|
||||||
|
dockerBuild
|
||||||
]
|
]
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
"file",
|
"file",
|
||||||
"Dockerfile"
|
"Dockerfile"
|
||||||
],
|
],
|
||||||
"c11eaf8c89e4dd4321444e4951f0047b2f1c4784c84edb027e06185359472781"
|
"23e349c902e95729709edde1e2605da6d464d666cf40271ce3aacdebb7760c40"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
FROM node:18-alpine AS node
|
# NOTE: Why do we specify alpine version here?
|
||||||
|
# Because if not, we had situations where it would use the different version
|
||||||
|
# locally and on Github CI. This way we ensure exact version is used,
|
||||||
|
# and also have control over updating it (instead of update surprising us).
|
||||||
|
FROM node:18-alpine3.17 AS node
|
||||||
|
|
||||||
|
|
||||||
FROM node AS base
|
FROM node AS base
|
||||||
@ -6,8 +10,11 @@ RUN apk --no-cache -U upgrade # To ensure any potential security patches are app
|
|||||||
|
|
||||||
|
|
||||||
FROM base AS server-builder
|
FROM base AS server-builder
|
||||||
# Install packages needed to build native npm packages.
|
|
||||||
RUN apk add --no-cache build-base libtool autoconf automake python3
|
RUN apk add --no-cache build-base libtool autoconf automake python3
|
||||||
|
# TODO: Remove line below (installation of openssl 1.1) once Prisma adds support for
|
||||||
|
# openssl 3 on alpine. Alpine >= 3.17 has openssl 3 as default.
|
||||||
|
# Relevant GH issue: https://github.com/wasp-lang/wasp/issues/877
|
||||||
|
RUN apk add --no-cache openssl1.1-compat
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# Install npm packages, resulting in node_modules/.
|
# Install npm packages, resulting in node_modules/.
|
||||||
COPY server/package*.json ./server/
|
COPY server/package*.json ./server/
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
"file",
|
"file",
|
||||||
"Dockerfile"
|
"Dockerfile"
|
||||||
],
|
],
|
||||||
"c11eaf8c89e4dd4321444e4951f0047b2f1c4784c84edb027e06185359472781"
|
"23e349c902e95729709edde1e2605da6d464d666cf40271ce3aacdebb7760c40"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
FROM node:18-alpine AS node
|
# NOTE: Why do we specify alpine version here?
|
||||||
|
# Because if not, we had situations where it would use the different version
|
||||||
|
# locally and on Github CI. This way we ensure exact version is used,
|
||||||
|
# and also have control over updating it (instead of update surprising us).
|
||||||
|
FROM node:18-alpine3.17 AS node
|
||||||
|
|
||||||
|
|
||||||
FROM node AS base
|
FROM node AS base
|
||||||
@ -6,8 +10,11 @@ RUN apk --no-cache -U upgrade # To ensure any potential security patches are app
|
|||||||
|
|
||||||
|
|
||||||
FROM base AS server-builder
|
FROM base AS server-builder
|
||||||
# Install packages needed to build native npm packages.
|
|
||||||
RUN apk add --no-cache build-base libtool autoconf automake python3
|
RUN apk add --no-cache build-base libtool autoconf automake python3
|
||||||
|
# TODO: Remove line below (installation of openssl 1.1) once Prisma adds support for
|
||||||
|
# openssl 3 on alpine. Alpine >= 3.17 has openssl 3 as default.
|
||||||
|
# Relevant GH issue: https://github.com/wasp-lang/wasp/issues/877
|
||||||
|
RUN apk add --no-cache openssl1.1-compat
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# Install npm packages, resulting in node_modules/.
|
# Install npm packages, resulting in node_modules/.
|
||||||
COPY server/package*.json ./server/
|
COPY server/package*.json ./server/
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
"file",
|
"file",
|
||||||
"Dockerfile"
|
"Dockerfile"
|
||||||
],
|
],
|
||||||
"c11eaf8c89e4dd4321444e4951f0047b2f1c4784c84edb027e06185359472781"
|
"23e349c902e95729709edde1e2605da6d464d666cf40271ce3aacdebb7760c40"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
FROM node:18-alpine AS node
|
# NOTE: Why do we specify alpine version here?
|
||||||
|
# Because if not, we had situations where it would use the different version
|
||||||
|
# locally and on Github CI. This way we ensure exact version is used,
|
||||||
|
# and also have control over updating it (instead of update surprising us).
|
||||||
|
FROM node:18-alpine3.17 AS node
|
||||||
|
|
||||||
|
|
||||||
FROM node AS base
|
FROM node AS base
|
||||||
@ -6,8 +10,11 @@ RUN apk --no-cache -U upgrade # To ensure any potential security patches are app
|
|||||||
|
|
||||||
|
|
||||||
FROM base AS server-builder
|
FROM base AS server-builder
|
||||||
# Install packages needed to build native npm packages.
|
|
||||||
RUN apk add --no-cache build-base libtool autoconf automake python3
|
RUN apk add --no-cache build-base libtool autoconf automake python3
|
||||||
|
# TODO: Remove line below (installation of openssl 1.1) once Prisma adds support for
|
||||||
|
# openssl 3 on alpine. Alpine >= 3.17 has openssl 3 as default.
|
||||||
|
# Relevant GH issue: https://github.com/wasp-lang/wasp/issues/877
|
||||||
|
RUN apk add --no-cache openssl1.1-compat
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# Install npm packages, resulting in node_modules/.
|
# Install npm packages, resulting in node_modules/.
|
||||||
COPY server/package*.json ./server/
|
COPY server/package*.json ./server/
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
"file",
|
"file",
|
||||||
"Dockerfile"
|
"Dockerfile"
|
||||||
],
|
],
|
||||||
"5199be314e1006eca5bbd649f1330d2fc508f15ecbcf33d508763b15aa304923"
|
"a52da8d519ba59a3c3e2c90bad1e8231c084fbf2db4993b1846bdd03cb4651c2"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
FROM node:18-alpine AS node
|
# NOTE: Why do we specify alpine version here?
|
||||||
|
# Because if not, we had situations where it would use the different version
|
||||||
|
# locally and on Github CI. This way we ensure exact version is used,
|
||||||
|
# and also have control over updating it (instead of update surprising us).
|
||||||
|
FROM node:18-alpine3.17 AS node
|
||||||
|
|
||||||
|
|
||||||
FROM node AS base
|
FROM node AS base
|
||||||
@ -6,8 +10,11 @@ RUN apk --no-cache -U upgrade # To ensure any potential security patches are app
|
|||||||
|
|
||||||
|
|
||||||
FROM base AS server-builder
|
FROM base AS server-builder
|
||||||
# Install packages needed to build native npm packages.
|
|
||||||
RUN apk add --no-cache build-base libtool autoconf automake python3
|
RUN apk add --no-cache build-base libtool autoconf automake python3
|
||||||
|
# TODO: Remove line below (installation of openssl 1.1) once Prisma adds support for
|
||||||
|
# openssl 3 on alpine. Alpine >= 3.17 has openssl 3 as default.
|
||||||
|
# Relevant GH issue: https://github.com/wasp-lang/wasp/issues/877
|
||||||
|
RUN apk add --no-cache openssl1.1-compat
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# Install npm packages, resulting in node_modules/.
|
# Install npm packages, resulting in node_modules/.
|
||||||
COPY server/package*.json ./server/
|
COPY server/package*.json ./server/
|
||||||
|
Loading…
Reference in New Issue
Block a user