(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
|
name: Deploy application with Docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
@ -19,10 +19,22 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push backend Docker image
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: azpect3120/potion.gophernest:latest
|
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
|
RUN npm install
|
||||||
|
|
||||||
COPY . .
|
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
|
RUN npm run build
|
||||||
|
|
||||||
# Runtime stage
|
# Runtime stage
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user