Skip to content

Commit

Permalink
remove unused vars and fix docker compose paths
Browse files Browse the repository at this point in the history
  • Loading branch information
dulvui committed Jun 3, 2024
1 parent 69ef028 commit 5dbca2e
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 23 deletions.
16 changes: 1 addition & 15 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

DB_HOST=localhost
DB_USERNAME=sfscon
DB_PASSWORD=sfscon
Expand All @@ -16,18 +15,5 @@ XML_URL="https://www.sfscon.it/?calendar=2023&format=xml"

REDIS_SERVER=localhost

PRINTER_X_API_KEY=__UUID__

CHECKIN_LANES='{"LANE1":"__PLACE_YOUR_LANE1_UUID__",
"LANE2":"__PLACE_YOUR_LANE2_UUID__",
"LANE3":"__PLACE_YOUR_LANE3_UUID__",
"LANE4":"__PLACE_YOUR_LANE4_UUID__"}'

LANE_USERNAME_PREFIX=LANE

LANE2PORT='{"LANE1":"__PORT__",
"LANE2":"__PORT__",
"LANE3":"__PORT__"}'

ADMIN_USERNAME=__ADMIN_USERNAME__
ADMIN_PASSWORD=__ADMIN_PLAINTEXT_PASSWORD__
ADMIN_PASSWORD=__ADMIN_PLAINTEXT_PASSWORD__
44 changes: 39 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:

env:
PROJECT_NAME: sfscon-backend


jobs:
deploy-test:
Expand All @@ -29,17 +28,35 @@ jobs:
env:
X_SERVER_PORT_CONFERENCES: ${{ env.SERVER_PORT_CONFERENCES }}
X_SERVER_PORT_PUSH_NOTIFICATIONS: ${{ env.SERVER_PORT_PUSH_NOTIFICATIONS }}

X_DOCKER_IMAGE: ${{ env.DOCKER_IMAGE}}
X_DOCKER_TAG: ${{ env.DOCKER_TAG }}

X_DB_HOST: localhost
X_DB_PORT: 5432

X_JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY}}
X_DB_USERNAME: ${{ secrets.DB_USERNAME }}
X_DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
X_DB_NAME: ${{ secrets.DB_NAME }}
X_ADMIN_USERNAME: ${{ secrets.ADMIN_USERNAME }}
X_ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
X_PRETIX_TOKEN: ${{ secrets.PRETIX_TOKEN }}
X_PRETIX_CHECKLIST_ID: __PLACE_CHECKLIST_ID__
X_PRETIX_EVENT_ID: __PLACE_EVENT_ID__
X_PRETIX_ORGANIZER_ID: noi-__PLACE_ORGANIZER_ID__

X_XML_URL: "https://www.sfscon.it/?calendar=2023&format=xml"
X_REDIS_SERVER: redis


- name: Build and push images
uses: noi-techpark/github-actions/docker-build-and-push@v2
with:
working-directory: infrastructure
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy application
uses: noi-techpark/github-actions/docker-deploy@v2
with:
Expand All @@ -49,7 +66,6 @@ jobs:
docker-username: "noi-techpark-bot"
docker-password: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
project-name: ${{ env.PROJECT_NAME }}

# deploy-prod:
# runs-on: ubuntu-22.04
# if: github.ref == 'refs/heads/prod'
Expand All @@ -74,13 +90,31 @@ jobs:
# X_DOCKER_IMAGE: ${{ env.DOCKER_IMAGE}}
# X_DOCKER_TAG: ${{ env.DOCKER_TAG }}
#
# X_JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY}}
# X_DB_USERNAME: ${{ secrets.DB_USERNAME }}
# X_DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
# X_DB_NAME: ${{ secrets.DB_NAME }}
# X_ADMIN_USERNAME: ${{ secrets.ADMIN_USERNAME }}
# X_ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
# X_PRETIX_TOKEN: ${{ secrets.PRETIX_TOKEN }}
# X_PRETIX_CHECKLIST_ID: __PLACE_CHECKLIST_ID__
# X_PRETIX_EVENT_ID: __PLACE_EVENT_ID__
# X_PRETIX_ORGANIZER_ID: noi-__PLACE_ORGANIZER_ID__
#
# X_XML_URL: "https://www.sfscon.it/?calendar=2023&format=xml"
# X_REDIS_SERVER: localhost
# X_PRINTER_X_API_KEY: __UUID__
# X_CHECKIN_LANES: '{"LANE1":"__PLACE_YOUR_LANE1_UUID__","LANE2":"__PLACE_YOUR_LANE2_UUID__","LANE3":"__PLACE_YOUR_LANE3_UUID__","LANE4":"__PLACE_YOUR_LANE4_UUID__"}'
# X_LANE_USERNAME_PREFIX: LANE
# X_LANE2PORT: '{"LANE1":"__PORT__","LANE2":"__PORT__","LANE3":"__PORT__"}'
#
# - name: Build and push images
# uses: noi-techpark/github-actions/docker-build-and-push@v2
# with:
# working-directory: infrastructure
# docker-username: ${{ github.actor }}
# docker-password: ${{ secrets.GITHUB_TOKEN }}
#
#
# - name: Deploy application
# uses: noi-techpark/github-actions/docker-deploy@v2
# with:
Expand Down
6 changes: 3 additions & 3 deletions infrastructure/docker-compose.run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ services:
postgres:
image: "postgres:14-alpine"
environment:
POSTGRES_DB: sfscon
POSTGRES_USER: sfscon
POSTGRES_PASSWORD: sfscon
POSTGRES_DB: ${ DB_NAME:sfscon }
POSTGRES_USER: ${ DB_USER:sfscon }
POSTGRES_PASSWORD: ${ DB_PASSWORD:sfscon }
hostname: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
Expand Down

0 comments on commit 5dbca2e

Please sign in to comment.