mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
added geonames_username env var to docker, frontend needs env build-time
This commit is contained in:
@@ -58,7 +58,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build image
|
||||
run: docker build frontend --tag $FRONTEND_IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" --build-arg BACKEND_URL=${BACKEND_URL} --build-arg RUNNING_ENV=${RUNNING_ENV} --build-arg ENABLE_WRITE=${ENABLE_WRITE} --target serve
|
||||
run: docker build frontend --tag $FRONTEND_IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" --build-arg BACKEND_URL=${BACKEND_URL} --build-arg RUNNING_ENV=${RUNNING_ENV} --build-arg ENABLE_WRITE=${ENABLE_WRITE} --build-arg GEONAMES_USERNAME=${{ secrets.GEONAMES_USERNAME }}--target serve
|
||||
|
||||
- name: Log in to registry
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
|
||||
@@ -10,6 +10,7 @@ services:
|
||||
BACKEND_URL: http://localhost:4000
|
||||
ENABLE_WRITE: true
|
||||
RUNNING_ENV: prod
|
||||
GEONAMES_USERNAME: '${GEONAMES_USERNAME}'
|
||||
ports:
|
||||
- 127.0.0.1:5173:5173
|
||||
|
||||
|
||||
@@ -3,12 +3,14 @@ FROM node:22-alpine3.20 AS build
|
||||
ARG BACKEND_URL="http://localhost:4000"
|
||||
ARG ENABLE_WRITE="false"
|
||||
ARG RUNNING_ENV
|
||||
ARG GEONAMES_USERNAME
|
||||
|
||||
ENV TZ="Europe/Helsinki"
|
||||
|
||||
ENV VITE_BACKEND_URL=$BACKEND_URL
|
||||
ENV VITE_RUNNING_ENV=$RUNNING_ENV
|
||||
ENV VITE_ENABLE_WRITE=$ENABLE_WRITE
|
||||
ENV VITE_GEONAMES_USERNAME=$GEONAMES_USERNAME
|
||||
USER node
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -3,12 +3,14 @@ FROM node:22-alpine3.20
|
||||
ARG BACKEND_URL="http://localhost:4000"
|
||||
ARG ENABLE_WRITE="false"
|
||||
ARG RUNNING_ENV
|
||||
ARG GEONAMES_USERNAME
|
||||
|
||||
ENV TZ="Europe/Helsinki"
|
||||
|
||||
ENV VITE_BACKEND_URL=$BACKEND_URL
|
||||
ENV VITE_RUNNING_ENV=$RUNNING_ENV
|
||||
ENV VITE_ENABLE_WRITE=$ENABLE_WRITE
|
||||
ENV VITE_GEONAMES_USERNAME=$GEONAMES_USERNAME
|
||||
|
||||
USER node
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
Reference in New Issue
Block a user