diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a198290 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,29 @@ +yarn-debug.log* +yarn-error.log* + +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b1ac443 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# develop stage +FROM node:20-alpine as develop-stage + +WORKDIR /app +COPY package*.json ./ +RUN yarn global add @quasar/cli && yarn --production=false +COPY . . + +# build stage +FROM develop-stage as build-stage +RUN yarn --production=false +RUN quasar build + +# production stage +FROM nginx:1.17.5-alpine as production-stage +COPY --from=build-stage /app/dist/spa /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/docker-compose.yml b/docker-compose.yml index e96470a..60b69c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,22 +1,46 @@ services: + db: - image: postgres:15-alpine - - cron: - image: - + image: mariadb:10.11 + ports: + - 3306:3306 + environment: + - MYSQL_USER=root + - MYSQL_DATABASE=ull_tracker + - MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=true + volumes: + - ./db/init.sql:/docker-entrypoint-initdb.d/init.sql:ro + - db-data:/var/lib/mysql:rw api: - context: - build: ../api + build: + context: ../api + ports: + - 8000:8000 + volumes: + - ../api:/app + environment: + TZ: "Europe/Prague" +# command: ls -l /app app: - context: - build: . - - nginx: - image: + build: + context: . + target: "develop-stage" + ports: + - "9001:9000" + volumes: + - ./src:/app/src + - ./public:/app/public + - ./node_modules:/app/node_modules:delegated + command: quasar dev +# nginx: +# image: +# +# +volumes: + db-data: { } diff --git a/quasar.config.js b/quasar.config.js index 0ff8898..2d1d769 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -25,7 +25,7 @@ module.exports = configure(function (/* ctx */) { // https://v2.quasar.dev/quasar-cli/prefetch-feature // preFetch: true, - // app boot file (/src/boot) + // app boot file (/poletani/boot) // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli/boot-files boot: [ diff --git a/src/components/AvatarFromPhoto.vue b/src/components/AvatarFromPhoto.vue index 1f29056..ed6f7cd 100644 --- a/src/components/AvatarFromPhoto.vue +++ b/src/components/AvatarFromPhoto.vue @@ -14,7 +14,7 @@ const props = defineProps({ diff --git a/src/components/flights/FlightsList.vue b/src/components/flights/FlightsList.vue index 6e28875..49fe9c3 100644 --- a/src/components/flights/FlightsList.vue +++ b/src/components/flights/FlightsList.vue @@ -1,9 +1,6 @@ diff --git a/src/layouts/PublicLayout.vue b/src/layouts/PublicLayout.vue index 72ea787..62178ba 100644 --- a/src/layouts/PublicLayout.vue +++ b/src/layouts/PublicLayout.vue @@ -13,7 +13,7 @@