(FEAT): CI/CD attempt one. This needs a merge.
This commit is contained in:
parent
f027a16b8c
commit
e6a387744e
16
.github/workflows/deploy.yml
vendored
16
.github/workflows/deploy.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: Deploy application with Docker
|
||||
|
||||
on:
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user