-
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.
- Loading branch information
0 parents
commit 3622e67
Showing
38 changed files
with
12,929 additions
and
0 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,60 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning. | ||
|
||
name: Create, publish and deploy Docker container | ||
|
||
on: [push, release] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: NUXT_UI_PRO_LICENSE=${{ secrets.NUXT_UI_PRO_LICENSE }} | ||
|
||
auto-deploy: | ||
runs-on: ubuntu-latest | ||
needs: build-and-push-image | ||
|
||
steps: | ||
- name: Post request to Portainer webhook | ||
uses: satak/webrequest-action@master | ||
with: | ||
url: ${{ secrets.PORTAINER_WEBHOOK_URL }} | ||
method: POST |
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,24 @@ | ||
# Nuxt dev/build outputs | ||
.output | ||
.data | ||
.nuxt | ||
.nitro | ||
.cache | ||
dist | ||
|
||
# Node dependencies | ||
node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Misc | ||
.DS_Store | ||
.fleet | ||
.idea | ||
|
||
# Local env files | ||
.env | ||
.env.* | ||
!.env.example |
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,25 @@ | ||
FROM node:20-slim as front-builder | ||
|
||
WORKDIR /usr/src/app | ||
|
||
ARG NUXT_UI_PRO_LICENSE | ||
|
||
ENV NUXT_UI_PRO_LICENSE=$NUXT_UI_PRO_LICENSE | ||
ENV NODE_ENV=production | ||
|
||
COPY . . | ||
|
||
RUN npm install -g pnpm | ||
RUN pnpm install | ||
RUN pnpm run build | ||
|
||
FROM node:20-slim as front-runner | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY --from=front-builder /usr/src/app/.output ./ | ||
EXPOSE 3000 | ||
|
||
ENV HOST=0.0.0.0 PORT=3000 NODE_ENV=production | ||
|
||
ENTRYPOINT ["node", "/usr/src/app/server/index.mjs"] |
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,75 @@ | ||
# Nuxt 3 Minimal Starter | ||
|
||
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. | ||
|
||
## Setup | ||
|
||
Make sure to install the dependencies: | ||
|
||
```bash | ||
# npm | ||
npm install | ||
|
||
# pnpm | ||
pnpm install | ||
|
||
# yarn | ||
yarn install | ||
|
||
# bun | ||
bun install | ||
``` | ||
|
||
## Development Server | ||
|
||
Start the development server on `http://localhost:3000`: | ||
|
||
```bash | ||
# npm | ||
npm run dev | ||
|
||
# pnpm | ||
pnpm run dev | ||
|
||
# yarn | ||
yarn dev | ||
|
||
# bun | ||
bun run dev | ||
``` | ||
|
||
## Production | ||
|
||
Build the application for production: | ||
|
||
```bash | ||
# npm | ||
npm run build | ||
|
||
# pnpm | ||
pnpm run build | ||
|
||
# yarn | ||
yarn build | ||
|
||
# bun | ||
bun run build | ||
``` | ||
|
||
Locally preview production build: | ||
|
||
```bash | ||
# npm | ||
npm run preview | ||
|
||
# pnpm | ||
pnpm run preview | ||
|
||
# yarn | ||
yarn preview | ||
|
||
# bun | ||
bun run preview | ||
``` | ||
|
||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. |
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,9 @@ | ||
export default defineAppConfig({ | ||
ui: { | ||
primary: 'orange', | ||
|
||
notifications: { | ||
position: 'top-0 right-0' | ||
} | ||
} | ||
}) |
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,25 @@ | ||
<script setup lang="ts"> | ||
const route = useRoute() | ||
const pageName = computed(() => { | ||
return route.name | ||
}) | ||
useHead(computed(() => { | ||
return { | ||
title: pageName.value + ' - Evently' | ||
} | ||
})) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<NuxtLoadingIndicator /> | ||
|
||
<NuxtLayout> | ||
<NuxtPage /> | ||
</NuxtLayout> | ||
|
||
<UNotifications class="pointer-events-none" /> | ||
</div> | ||
</template> |
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,44 @@ | ||
<script setup lang="ts"> | ||
import type { EventResponseDto } from '~/composables/generated/Api' | ||
const props = defineProps<{ | ||
event: EventResponseDto | ||
}>() | ||
function parseDate(date: Date) { | ||
return ( | ||
new Date(date).toLocaleDateString({ | ||
year: 'numeric', | ||
month: 'long', | ||
day: 'numeric' | ||
}) | ||
+ ' ' | ||
+ new Date(date).toLocaleTimeString('en-CA', { | ||
hour: '2-digit', | ||
minute: '2-digit' | ||
}) | ||
) | ||
} | ||
const { event } = toRefs(props) | ||
</script> | ||
|
||
<template> | ||
<ULandingCard | ||
:title="event.name" | ||
:description="event.description" | ||
:to="`/events/${event._id}`" | ||
class="col-span-4" | ||
> | ||
<div class="flex items-center gap-1 text-sm text-gray-500 dark:text-gray-400"> | ||
<UIcon name="i-mdi-calendar-month" /> | ||
<p> | ||
{{ parseDate(event.startDate) }} - {{ parseDate(event.endDate) }} | ||
</p> | ||
</div> | ||
</ULandingCard> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
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,25 @@ | ||
<script setup lang="ts"> | ||
</script> | ||
|
||
<template> | ||
<UFooter> | ||
<template #left> | ||
<div class="flex flex-col items-start"> | ||
<p class="font-semibold"> | ||
Evently © | ||
</p> | ||
<p class="mt-4"> | ||
Developed using Nuxt, Nuxt UI and Tailwind | ||
</p> | ||
<p class="mt-2"> | ||
Adria Djafri - Antoine Souben-Fink - Mathurin Lemoine - Félix Terrien - Alexandre Guénégan | ||
</p> | ||
</div> | ||
</template> | ||
</UFooter> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
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,67 @@ | ||
<script setup lang="ts"> | ||
const userStore = useUserStore() | ||
const links = computed(() => { | ||
const l = [] | ||
if (userStore.loggedIn) { | ||
l.push({ | ||
label: 'Discover', | ||
to: '/discover' | ||
}) | ||
l.push({ | ||
label: 'Account', | ||
to: '/account' | ||
}) | ||
l.push({ | ||
label: 'My Events', | ||
to: '/my-events' | ||
}) | ||
} else { | ||
l.push({ | ||
label: 'Home', | ||
to: '/' | ||
}) | ||
} | ||
return l | ||
}) | ||
function logout() { | ||
userStore.logout() | ||
navigateTo('/') | ||
} | ||
</script> | ||
|
||
<template> | ||
<UHeader | ||
title="Evently" | ||
:links="links" | ||
> | ||
<template #right> | ||
<template v-if="userStore.loggedIn"> | ||
<UButton | ||
label="Log out" | ||
icon="mdi-logout" | ||
color="white" | ||
@click="logout" | ||
/> | ||
</template> | ||
<template v-else> | ||
<UButton | ||
to="/auth/login" | ||
label="Sign in" | ||
icon="mdi-login" | ||
color="white" | ||
/> | ||
<UButton | ||
to="/auth/register" | ||
label="Sign up" | ||
icon="mdi-account-plus" | ||
/> | ||
</template> | ||
</template> | ||
</UHeader> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
Oops, something went wrong.