-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modify axios config, add pipeline, expose application to the web
- Loading branch information
Showing
5 changed files
with
72 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: CI/CD for website | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
deploy-project: | ||
runs-on: home-server | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check docker compose is present | ||
run: | | ||
docker compose --version | ||
- name: Navigate to the hbd dir and build + bring up the container | ||
run: | | ||
cd /home/dreth/IOTstack/volumes/hbd && | ||
git pull && | ||
docker compose build && | ||
docker stop hbd || true && | ||
docker rm hbd || true && | ||
docker compose up -d hbd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -208,3 +208,6 @@ go.work.sum | |
|
||
# env file | ||
.env | ||
|
||
# hbd-data directory | ||
hbd-data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
services: | ||
hbd: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
container_name: hbd | ||
ports: | ||
- "8417:8417" | ||
- "8418:8418" | ||
environment: | ||
- DB_TYPE=sqlite | ||
- DATABASE_URL=/app/backend/hbd.db | ||
- MASTER_KEY=35e150e7ca83247f18cb1a37d61d8e161dddec06027f5db009b34da48c25f1b5 | ||
- PORT=8418 | ||
- ENVIRONMENT=production | ||
- CUSTOM_DOMAIN=https://hbd.lotiguere.com | ||
labels: | ||
# Frontend | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.hbd.rule=Host(`hbd.lotiguere.com`)" | ||
- "traefik.http.routers.hbd.entrypoints=websecure" | ||
- "traefik.http.routers.hbd.tls.certresolver=myresolver" | ||
- "traefik.http.services.hbd.loadbalancer.server.port=8418" | ||
|
||
# Backend | ||
- "traefik.http.routers.hbd-api.rule=Host(`hbd.lotiguere.com`) && PathPrefix(`/api`)" | ||
- "traefik.http.routers.hbd-api.entrypoints=websecure" | ||
- "traefik.http.routers.hbd-api.tls.certresolver=myresolver" | ||
- "traefik.http.services.hbd-api.loadbalancer.server.port=8417" | ||
|
||
networks: | ||
proxy: | ||
external: true | ||
|
||
volumes: | ||
hbd-data: | ||
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters