(FEAT): CI/CD attempt one. This needs a merge.

This commit is contained in:
Hayden Hargreaves 2025-12-28 22:25:52 -07:00
parent f027a16b8c
commit e6a387744e
2 changed files with 24 additions and 2 deletions

View File

@ -19,10 +19,22 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push Docker image
- name: Build and push backend Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: azpect3120/potion.gophernest:latest
- name: Build and push frontend Docker image
uses: docker/build-push-action@v5
with:
context: ./web
file: ./Dockerfile
push: true
tags: azpect3120/potion.frontend:latest
build-args: |
VITE_ENVIRONMENT=prod
VITE_DOMAIN_DEV=http://localhost:3000
VITE_DOMAIN_PROD=https://potion-backend.gophernest.net

View File

@ -6,6 +6,16 @@ COPY package*.json ./
RUN npm install
COPY . .
# Build-time config: defaults are prod-safe, can be overridden if needed
ARG VITE_ENVIRONMENT=prod
ARG VITE_DOMAIN_DEV=http://localhost:3000
ARG VITE_DOMAIN_PROD=https://potion-backend.gophernest.net
ENV VITE_ENVIRONMENT=$VITE_ENVIRONMENT
ENV VITE_DOMAIN_DEV=$VITE_DOMAIN_DEV
ENV VITE_DOMAIN_PROD=$VITE_DOMAIN_PROD
RUN npm run build
# Runtime stage