add drone integration
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Yann Autissier
2024-12-05 00:15:02 +00:00
parent 3b32a5314e
commit ea1631756f
5 changed files with 95 additions and 0 deletions

17
docker/Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
ARG NODE_VERSION=22
FROM node:${NODE_VERSION}-alpine AS base
WORKDIR /app
FROM base AS build
COPY package.json package-lock.json ./
RUN npm install
COPY --link ./ ./
FROM build AS master
RUN npm run build
FROM base AS prod
ENV NODE_ENV=production
# COPY --from=build /app/node_modules /app/node_modules
COPY --from=master /app/.output /app/.output
CMD [ "node", ".output/server/index.mjs" ]

View File

@@ -0,0 +1,8 @@
version: "3"
services:
front:
labels:
- SERVICE_3000_CHECK_HTTP=${SERVICE_3000_CHECK_HTTP:-/}
- SERVICE_3000_NAME=${SERVICE_3000_NAME:-${COMPOSE_PROJECT_NAME:-adv}-front-3000}
- SERVICE_3000_TAGS=${SERVICE_3000_TAGS:-urlprefix-adv.localhost/}

View File

@@ -0,0 +1,7 @@
version: "3"
services:
front:
ports:
- 3000:3000

12
docker/docker-compose.yml Normal file
View File

@@ -0,0 +1,12 @@
version: "3"
services:
front:
build:
context: ..
dockerfile: docker/Dockerfile
environment:
NODE_ENV: ${NODE_ENV:-production}
NUXT_APP_BASE_URL: ${NUXT_APP_BASE_URL:-/}
ports:
- 3000