Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sisimomo committed Aug 26, 2023
0 parents commit 9368f83
Show file tree
Hide file tree
Showing 716 changed files with 10,924 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/ feature-request---.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "Feature request \U0001F680"
about: Suggest an idea
labels: enhancement

---

## Summary
Brief explanation of the feature.

### Basic example
Include a basic example or links here.

### Motivation
Why are we doing this? What use cases does it support? What is the expected outcome?
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report---.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "Bug report \U0001F41E"
about: Create a bug report
labels: bug

---

## Describe the bug
A clear and concise description of what the bug is.

### Steps to reproduce
Steps to reproduce the behavior.

### Expected behavior
A clear and concise description of what you expected to happen.

### Environment
- OS: [e.g. Arch Linux]
- Other details that you think may affect.

### Additional context
Add any other context about the problem here.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
53 changes: 53 additions & 0 deletions .github/workflows/ deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build & Deploy

on:
release:
types: [ published ]
workflow_dispatch:

jobs:
build_and_push:
name: Build & Push to DockerHub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Docker Build and Push to DockerHub
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: sisimomo/graphql-sakila-demo:latest , sisimomo/graphql-sakila-demo:${{ github.event.release.tag_name }}

deploy_to_vm:
name: Deploy to VM
runs-on: ubuntu-latest
needs: build_and_push
steps:
- name: Connect with SSH and Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd ~/deployments/graphqlSakila/docker-compose/prod
docker compose down
git pull
docker compose up -d
docker pull sisimomo/graphql-sakila-demo
docker restart graphqlSakila_dgs
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
.jpb
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
/gradle.properties

.env
build.gradle.local
settings.gradle.local

### Custom ###
schema.sql
docker-compose/*/mariadb_data/volume/*
!docker-compose/*/mariadb_data/volume/.gitkeep
35 changes: 35 additions & 0 deletions .run/Create Seed Data.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" factoryName="Gradle" name="Create Seed Data"
type="GradleRunConfiguration">
<DebugAllEnabled>false</DebugAllEnabled>
<ExternalSystemDebugServerProcess>false</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<ExternalSystemSettings>
<option name="env">
<map>
<entry key="DB_ENCRYPTION_KEY" value="drIeoH5OZAhOTP62tFlD3Q=="/>
<entry key="MARIADB_PASSWORD" value="password"/>
<entry key="MARIADB_USER" value="user"/>
<entry key="PAGINATION_ENCRYPTION_KEY" value="we9Pat8D3BFm1j/Cd8y7GQ=="/>
</map>
</option>
<option name="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list/>
</option>
<option name="taskNames">
<list>
<option value=":test"/>
<option value="--tests"/>
<option value="&quot;com.github.sisimomo.graphqlsakila.seed.TestCreateSeedData&quot;"/>
</list>
</option>
<option name="vmOptions"/>
</ExternalSystemSettings>
<ForceTestExec>false</ForceTestExec>
<method v="2"/>
</configuration>
</component>
15 changes: 15 additions & 0 deletions .run/Local.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Local" type="Application" factoryName="Application">
<envs>
<env name="DB_ENCRYPTION_KEY" value="drIeoH5OZAhOTP62tFlD3Q==" />
<env name="MARIADB_USER" value="user" />
<env name="MARIADB_PASSWORD" value="password" />
<env name="PAGINATION_ENCRYPTION_KEY" value="we9Pat8D3BFm1j/Cd8y7GQ==" />
</envs>
<option name="MAIN_CLASS_NAME" value="com.github.sisimomo.graphqlsakila.GraphqlSakilaApplication" />
<module name="graphqlSakila.main" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Gradle Build
FROM arm64v8/gradle:8.2-jdk-focal AS builder
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle build -x test --no-daemon

# Run
FROM openjdk:17-jdk-slim-buster
COPY --from=builder /home/gradle/src/build/libs/*.jar /app/spring-boot-application.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/app/spring-boot-application.jar"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Simon Vallières

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 9368f83

Please sign in to comment.