diff --git a/.env b/.env new file mode 100644 index 0000000..faadf14 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +APP_POSTMAIL_ACCESS_TOKEN=s7uhce84sx6fayy5xlq0nrtx diff --git a/Dockerfile b/Dockerfile index ce5c0fd..02508d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node as build +FROM node:20-alpine as build # Variables ARG NODE_ENV=prod @@ -8,15 +8,24 @@ ENV NG_CLI_ANALYTICS=ci \ NODE_OPTIONS=${NODE_OPTIONS} # Setup +RUN mkdir /app WORKDIR /app COPY . . -# Install & build -RUN if [ ! -d "dist" ]; then npm ci && npm run build; fi +# Build +RUN if [ ! -d "dist" ]; then npm install && npm run build; fi # Use Nginx to serve -FROM nginx:1.20-alpine -COPY --from=build /app/dist/browser /usr/share/nginx/html +FROM nginx:1.23-alpine +COPY --from=build /app/dist /usr/share/nginx/html + +# Copy aditional files +COPY package.json /usr/share/nginx/html COPY docker/robots.txt /usr/share/nginx/html/robots.txt COPY docker/nginx.conf /etc/nginx/nginx.conf + +# Setup environment varible script +COPY docker/setup-environment.sh /docker-entrypoint.d/setup-environment.sh +RUN chmod +x /docker-entrypoint.d/setup-environment.sh + EXPOSE 80 diff --git a/docker/setup-environment.sh b/docker/setup-environment.sh new file mode 100644 index 0000000..4d1e024 --- /dev/null +++ b/docker/setup-environment.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +JSON_STRING='window.env = { \ + APP_POSTMAIL_ACCESS_TOKEN: "'"${APP_POSTMAIL_ACCESS_TOKEN}"'", \ +}' +sed -i "s@@@" /usr/share/nginx/html/index.html +exec "$@" diff --git a/index.html b/index.html index 7c7a479..407ea0c 100644 --- a/index.html +++ b/index.html @@ -1,22 +1,24 @@ - ZaksCode + - + + + + - - - + + diff --git a/public/logo.png b/public/logo.png index 0d62d46..adbabde 100644 Binary files a/public/logo.png and b/public/logo.png differ diff --git a/src/App.vue b/src/App.vue index 2394f2e..f047247 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,7 +10,7 @@ import Profile from '@/components/profile.vue';
-
+
diff --git a/src/components/card.vue b/src/components/card.vue new file mode 100644 index 0000000..a03bbab --- /dev/null +++ b/src/components/card.vue @@ -0,0 +1,23 @@ + + + diff --git a/src/components/contact.vue b/src/components/contact.vue index 668ea75..6e64eb5 100644 --- a/src/components/contact.vue +++ b/src/components/contact.vue @@ -1,5 +1,6 @@ diff --git a/src/components/profile.vue b/src/components/profile.vue index e27308d..087cade 100644 --- a/src/components/profile.vue +++ b/src/components/profile.vue @@ -21,7 +21,7 @@ import Icon from '@/components/icon.vue'; diff --git a/src/components/projects.vue b/src/components/projects.vue index 7fe4be7..bb6384b 100644 --- a/src/components/projects.vue +++ b/src/components/projects.vue @@ -15,8 +15,7 @@ defineProps({