mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
fix ci/cd
This commit is contained in:
parent
a2508e5bbe
commit
886d1b7a50
34
frontend/Caddyfile
Normal file
34
frontend/Caddyfile
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
auto_https off
|
||||||
|
admin off
|
||||||
|
}
|
||||||
|
|
||||||
|
:80 {
|
||||||
|
@proxied path /api/* /docs /openapi.json
|
||||||
|
|
||||||
|
@static {
|
||||||
|
file
|
||||||
|
path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp
|
||||||
|
}
|
||||||
|
|
||||||
|
encode gzip zstd
|
||||||
|
|
||||||
|
# Handles Recipe Images / Assets
|
||||||
|
handle_path /api/media/recipes/* {
|
||||||
|
header @static Cache-Control max-age=31536000
|
||||||
|
root * /app/data/recipes/
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
|
||||||
|
handle @proxied {
|
||||||
|
uri strip_suffix /
|
||||||
|
reverse_proxy http://mealie-api
|
||||||
|
}
|
||||||
|
|
||||||
|
handle {
|
||||||
|
header @static Cache-Control max-age=31536000
|
||||||
|
root * /app/dist
|
||||||
|
try_files {path}.html {path} /
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
}
|
47
frontend/Dockerfile
Normal file
47
frontend/Dockerfile
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
FROM node:lts as builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install Caddy
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y \
|
||||||
|
curl \
|
||||||
|
apt-transport-https \
|
||||||
|
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | apt-key add - \
|
||||||
|
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y \
|
||||||
|
caddy
|
||||||
|
|
||||||
|
RUN yarn install \
|
||||||
|
--prefer-offline \
|
||||||
|
--frozen-lockfile \
|
||||||
|
--non-interactive \
|
||||||
|
--production=false
|
||||||
|
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
RUN rm -rf node_modules && \
|
||||||
|
NODE_ENV=production yarn install \
|
||||||
|
--prefer-offline \
|
||||||
|
--pure-lockfile \
|
||||||
|
--non-interactive \
|
||||||
|
--production=true
|
||||||
|
|
||||||
|
FROM node:15-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# copying caddy into image
|
||||||
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||||
|
COPY ./Caddyfile /app
|
||||||
|
COPY --from=builder /app .
|
||||||
|
|
||||||
|
ENV HOST 0.0.0.0
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
RUN ["caddy", "start", "--config", "/app/Caddyfile"]
|
||||||
|
|
||||||
|
CMD [ "yarn", "start" ]
|
@ -136,7 +136,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { validators } from "@/composables/use-validators";
|
import { validators } from "@/composables/use-validators";
|
||||||
import { fieldTypes } from "@/composables/forms";
|
import { fieldTypes } from "@/composables/forms";
|
||||||
import { ref } from "@vue/composition-api";
|
import { ref } from "@nuxtjs/composition-api";
|
||||||
|
|
||||||
const BLUR_EVENT = "blur";
|
const BLUR_EVENT = "blur";
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { validators } from "@/composables/use-validators";
|
import { validators } from "@/composables/use-validators";
|
||||||
import { fieldTypes } from "@/composables/forms";
|
import { fieldTypes } from "@/composables/forms";
|
||||||
import { ref } from "@vue/composition-api";
|
import { ref } from "@nuxtjs/composition-api";
|
||||||
|
|
||||||
const BLUR_EVENT = "blur";
|
const BLUR_EVENT = "blur";
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// TODO: Fix composition API "Should only be called once" error
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// Global page headers: https://go.nuxtjs.dev/config-head
|
// Global page headers: https://go.nuxtjs.dev/config-head
|
||||||
head: {
|
head: {
|
||||||
@ -64,14 +66,6 @@ export default {
|
|||||||
"@nuxtjs/proxy",
|
"@nuxtjs/proxy",
|
||||||
],
|
],
|
||||||
|
|
||||||
proxy: {
|
|
||||||
// see Proxy section
|
|
||||||
"/api": {
|
|
||||||
changeOrigin: true,
|
|
||||||
target: "http://localhost:9000",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
auth: {
|
auth: {
|
||||||
redirect: {
|
redirect: {
|
||||||
login: "/user/login",
|
login: "/user/login",
|
||||||
@ -183,7 +177,17 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Axios module configuration: https://go.nuxtjs.dev/config-axios
|
// Axios module configuration: https://go.nuxtjs.dev/config-axios
|
||||||
axios: {},
|
axios: {
|
||||||
|
proxy: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
proxy: {
|
||||||
|
// see Proxy section
|
||||||
|
"/api": {
|
||||||
|
changeOrigin: true,
|
||||||
|
target: process.env.NODE_ENV === "production" ? "http://mealie-api:9000" : "http://localhost:9000",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
// PWA module configuration: https://go.nuxtjs.dev/pwa
|
// PWA module configuration: https://go.nuxtjs.dev/pwa
|
||||||
pwa: {
|
pwa: {
|
||||||
@ -230,5 +234,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Build Configuration: https://go.nuxtjs.dev/config-build
|
// Build Configuration: https://go.nuxtjs.dev/config-build
|
||||||
build: {},
|
build: {
|
||||||
|
transpile: [/@vue[\\/]composition-api/],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user