Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Allypost committed May 9, 2020
0 parents commit 76c1ecf
Show file tree
Hide file tree
Showing 29 changed files with 10,499 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .docker/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:14-alpine

ENV APP_ROOT /web

RUN mkdir ${APP_ROOT}
WORKDIR ${APP_ROOT}

CMD ["node"]
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
npm-debug.log
.dockerignore
.gitignore
.git
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BASE_URL=https://meetup.jobfair.fer.unizg.hr
PORT=7984
HOST=localhost
107 changes: 107 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: [
"@nuxtjs/eslint-config-typescript",
"plugin:nuxt/recommended",
],
// add your custom rules here
rules: {
"nuxt/no-cjs-in-config": "off",
"space-before-function-paren": [
"error", "never",
],
"vue/html-indent": [
"error", 2,
],
"vue/script-indent": [
"error", 2,
{
"baseIndent": 1,
"switchCase": 1,
},
],
"indent": "off",
"@typescript-eslint/indent": "off",
"array-bracket-spacing": [ "error", "always" ],
"arrow-parens": [ "error", "always" ],
"arrow-spacing": "error",
"camelcase": [
"error",
{
ignoreDestructuring: true,
},
],
"comma-dangle": [ "error", "always-multiline" ],
"comma-spacing": [
"error",
{
"before": false,
"after": true,
},
],
"comma-style": [ "error", "last" ],
"computed-property-spacing": [ "error", "always" ],
"dot-notation": "error",
"eqeqeq": [ "error", "always" ],
"guard-for-in": "error",
"linebreak-style": [ "error", "unix" ],
"lines-between-class-members": [ "error", "always" ],
"no-array-constructor": "error",
"no-bitwise": "error",
"no-mixed-operators": "error",
"no-multi-assign": "error",
"no-multiple-empty-lines": [
"error",
{
"max": 2,
"maxEOF": 1,
"maxBOF": 1,
},
],
"no-console": "warn",
"no-nested-ternary": "error",
"no-new-object": "error",
"no-tabs": "warn",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-return-assign": [ "error", "always" ],
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-useless-constructor": "error",
"object-shorthand": [ "error", "always" ],
"prefer-arrow-callback": "warn",
"prefer-const": "warn",
"prefer-destructuring": [
"warn",
{
"array": true,
"object": true,
},
{
"enforceForRenamedProperties": false,
},
],
"prefer-numeric-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "warn",
"prefer-template": "warn",
"quotes": [
"error",
"double",
{
"avoidEscape": true,
},
],
"semi": [ "error", "always" ],
"space-before-blocks": [ "warn", "always" ],
"space-infix-ops": "error",
"template-tag-spacing": [ "error", "never" ],
"wrap-iife": [ "error", "inside" ],
"yoda": [ "error", "always", { "exceptRange": true } ],
},
};
90 changes: 90 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# Nuxt generate
dist

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

# IDE / Editor
.idea

# Service worker
sw.*

# macOS
.DS_Store

# Vim swap files
*.swp
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
NODE_MODULES := ./node_modules

.PHONY: up dev down install yarn-install build clean restart

stop:
docker/compose stop

start:
docker/compose start

up: build
docker/compose up -d

dev: $(NODE_MODULES)
docker/yarn dev
$(MAKE) down

down:
docker/compose down

restart: down up

install: clean yarn-install

yarn-install:
docker/yarn install

build: yarn-install
docker/yarn build

clean:
rm -rf $(NODE_MODULES) .nuxt

build-containers:
docker/compose build

$(NODE_MODULES): yarn-install
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# jobfair-meetup

> JobFair meetup site
## Build Setup

```bash
# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

# build for production and launch server
$ yarn build
$ yarn start

# generate static project
$ yarn generate
```

For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
9 changes: 9 additions & 0 deletions assets/styles/global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import "~vue-material/dist/theme/engine"; // Import the theme engine

@include md-register-theme("default", (
primary: #ecb000,
accent: #ebeae8,
theme: dark,
));

@import "~vue-material/dist/theme/all"; // Apply the theme
34 changes: 34 additions & 0 deletions components/Logo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<template>
<svg class="NuxtLogo" width="245" height="180" viewBox="0 0 452 342" xmlns="http://www.w3.org/2000/svg">
<g fill="none" fill-rule="evenodd">
<path
d="M139 330l-1-2c-2-4-2-8-1-13H29L189 31l67 121 22-16-67-121c-1-2-9-14-22-14-6 0-15 2-22 15L5 303c-1 3-8 16-2 27 4 6 10 12 24 12h136c-14 0-21-6-24-12z"
fill="#00C58E"
/>
<path
d="M447 304L317 70c-2-2-9-15-22-15-6 0-15 3-22 15l-17 28v54l39-67 129 230h-49a23 23 0 0 1-2 14l-1 1c-6 11-21 12-23 12h76c3 0 17-1 24-12 3-5 5-14-2-26z"
fill="#108775"
/>
<path
d="M376 330v-1l1-2c1-4 2-8 1-12l-4-12-102-178-15-27h-1l-15 27-102 178-4 12a24 24 0 0 0 2 15c4 6 10 12 24 12h190c3 0 18-1 25-12zM256 152l93 163H163l93-163z"
fill="#2F495E"
fill-rule="nonzero"
/>
</g>
</svg>
</template>
<style>
.NuxtLogo {
animation: 1s appear;
margin: auto;
}
@keyframes appear {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
</style>
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '3'

services:
nuxt:
build:
context: .
dockerfile: .docker/node/Dockerfile
restart: always
volumes:
- .:/web
env_file:
- .env
depends_on:
- meetup-db
command:
"yarn start"


meetup-db:
image: postgres:11-alpine
restart: always
environment:
POSTGRES_PASSWORD: 'postgres'
POSTGRES_USER: 'postgres'
POSTGRES_DB: 'meetup'
volumes:
- /var/lib/postgresql/data
16 changes: 16 additions & 0 deletions docker/compose
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -e

DIR="$(pwd)"

# Order of docker-compose yaml files
#
# 1) docker-compose.yaml
# 2) docker-compose.override.yaml

source "$DIR/.env"

ARGS=()

docker-compose "${ARGS[@]}" "$@"
Loading

0 comments on commit 76c1ecf

Please sign in to comment.