Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardofg87 committed Jun 23, 2019
1 parent 6b39955 commit 4f8351e
Show file tree
Hide file tree
Showing 169 changed files with 10,353 additions and 2 deletions.
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM alpine:3.5 as build
LABEL maintainer Eduardo Figueiredo Gonçalves <[email protected]>
ENV HUGO_VERSION 0.55.6
ENV HUGO_BINARY hugo_${HUGO_VERSION}_Linux-64bit.tar.gz
#https://github.com/gohugoio/hugo/releases/download/v0.55.6/hugo_0.55.6_Linux-64bit.tar.gz

# We add git to the build stage, because Hugo needs it with --enableGitInfo
RUN apk add --no-cache git

# Install Hugo
RUN set -x && \
apk add --update wget ca-certificates && \
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} && \
tar xzf ${HUGO_BINARY} && \
rm -r ${HUGO_BINARY} && \
mv hugo /usr/bin && \
apk del wget ca-certificates && \
rm /var/cache/apk/*

COPY . /site

WORKDIR /site

# And then we just run Hugo
RUN /usr/bin/hugo --minify --enableGitInfo

# By default, serve site alterar para https://gobh.dev/ no deploy
ENV HUGO_BASE_URL https://gobh.dev/
CMD hugo server -D \
--baseUrl=${HUGO_BASE_URL} \
--port=80 \
--appendPort=false \
--bind=0.0.0.0 \
--disableLiveReload=false
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# sitegobh
Site da comunidade Go BH - Feito com Hugo, usando Docker e Traefik
# Sobre
Site da comunidade Go de Belo Horizonte, tecnologias usadas: [Go](https://golang.org/), [Hugo](https://gohugo.io/), [Traefik](https://traefik.io/) e [Docker](https://www.docker.com/).

## [Traefik](https://traefik.io/)
É um proxy reverso feito em Go muito potente, possui balanceador de carga, integração com a API do Let's Encrypt](https://letsencrypt.org/) e é muito simples de expor containers Docker.

#### No diretório docker/dev
`docker-compose up -d`

## [Hugo](https://gohugo.io/)
É um framework muito rápido para criação de sites estáticos, open-source e possui vários templates free.
#### No diretório raiz do projeto
`docker-compose up -d`
24 changes: 24 additions & 0 deletions _docker/expires.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# cache.appcache, your document html and data
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
}

# Feed
location ~* \.(?:rss|atom)$ {
expires 1h;
add_header Cache-Control "public";
}

# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}

# CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}
6 changes: 6 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

52 changes: 52 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# quando estiver no server
baseURL = "https://gobh.dev/"
# quando estiver local
# baseURL = ""
languageCode = "pt_BR"
title = "Site da Comunidade Go de BH"
defaultContentLanguage = "pt"
theme = "cupper-hugo-theme"
#googleAnalytics = ""
#disqusShortname = "yourdiscussshortname"
enableGitInfo = true

[taxonomies]
tag = "tags"

[permalinks]
post = "/:filename/"

[imaging]
quality = 99

[params]
description = "Sua mais nova fonte de pesquisa para conteúdo de Golang [Go BH](https://gobh.dev) ."
homeMetaContent = "Comunidade Go BH"
footer = "Made with [Hugo](https://gohugo.io/). Themed by [Cupper](https://github.com/zwbetz-gh/cupper-hugo-theme). Deployed to [Digital Ocean](https://m.do.co/c/88c982476b95)."
# For more date formats see https://gohugo.io/functions/format/
dateFormat = "Jan 2, 2006"
#codePenUser = "someUser"
katex = true


[menu]
[[menu.nav]]
name = "Home"
url = "/"
weight = 1
[[menu.nav]]
name = "Blog"
url = "/blog/"
weight = 2
[[menu.nav]]
name = "Redes Sociais"
url = "/redes-sociais/"
weight = 3
[[menu.nav]]
name = "Sobre"
url = "/sobre/"
weight = 4
[[menu.nav]]
name = "RSS"
url = "/index.xml"
weight = 5
12 changes: 12 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
date: "2017-06-26T18:27:58+01:00"
title: "Home"
---

Veja os próximos eventos:

Evento DITO 29/06/2019

{{<figure img="dito.jpeg" caption="Evento DITO 29/06/2019" command="Resize" options="700x">}}


7 changes: 7 additions & 0 deletions content/blog/hello-world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Hello World"
date: 2019-06-20T13:15:40-03:00
draft: true
---
### Participe da comunidade com artigos sobre Go!
Escreve seu artigo e faça um PR no Github da comunidade, para dúvidas entre em contato com o Eduardo Gonçalves (eduardo at gobh.dev) ou Diego Santos (diego at gobh.dev)
Binary file added content/dito.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions content/redes-sociais.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Redes Sociais"
date: 2019-06-20T13:15:40-03:00
draft: true
---

Redes Sociais

* [Telegram](https://telegramgo_bh) Faça parte do nosso grupo e venha compartilhar ideias.

* [Github](https://github.com/gobelohorizonte) Compartilhe projetos e talks apresentadas.

* [Meetup](https://www.meetup.com/go-belo-horizonte) Venha participar dos nossos eventos.
7 changes: 7 additions & 0 deletions content/sobre.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Sobre"
date: 2019-06-20T13:15:40-03:00
draft: true
---

Comunidade GO-BH é bem ativa, é de costume fazer 1 meetup por mês e sempre de casa cheia.
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3'

services:
gobh:
build:
context: .
ports:
- "8081:80" # The HTTP port
Empty file added docker/dev/acme.json
Empty file.
15 changes: 15 additions & 0 deletions docker/dev/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3'

services:
traefik.gobh:
image: traefik # The official Traefik docker image
restart: always
command: --api --docker # Enables the web UI and tells Traefik to listen to docker
ports:
- "80:80" # The HTTP port
- "443:443"
- "8080:8080" # The Web UI (enabled by --api)
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/traefik.toml
- ./acme.json:/acme.json
33 changes: 33 additions & 0 deletions docker/dev/traefik.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
debug = false
logLevel = "ERROR"

defaultEntryPoints = ["http", "https"]

[web]
address = ":8080"

[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"

[entryPoints.https]
address = ":443"
[entryPoints.https.tls]

[retry]

[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "gobh.dev"
watch = true
exposedByDefault = false

[acme]
email = "[email protected]"
storage = "acme.json"
entryPoint = "https"
onHostRule = true
[acme.httpChallenge]
entryPoint = "http"
12 changes: 12 additions & 0 deletions docker/grafana/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3"

services:
grafana:
image: grafana/grafana:5.1.0
restart: always
ports:
- 3000:3000
# user: "104"
#volumes:
# - "./grafana-storage:/var/lib/grafana"
# - "./plugins:/var/lib/grafana/plugins"
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>
14 changes: 14 additions & 0 deletions public/categories/index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Categories on Comunidade Go Belo Horizonte - Go BH</title>
<link>http://localhost:1313/categories/</link>
<description>Recent content in Categories on Comunidade Go Belo Horizonte - Go BH</description>
<generator>Hugo -- gohugo.io</generator>
<language>pt-br</language>

<atom:link href="http://localhost:1313/categories/index.xml" rel="self" type="application/rss+xml" />


</channel>
</rss>
Binary file added public/css/fonts/miriamlibre-bold.woff
Binary file not shown.
Binary file added public/css/fonts/miriamlibre-bold.woff2
Binary file not shown.
6 changes: 6 additions & 0 deletions public/css/images/arrow_effect.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/css/images/icon-tick.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/css/images/stripe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4f8351e

Please sign in to comment.