Skip to content

Commit

Permalink
rename docker components, update README and Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
krustowski committed Aug 31, 2024
1 parent 071a58f commit cafe3ed
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 41 deletions.
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# litter-go / environment constatns
# littr / environment constatns
#

APP_NAME=litter-go
APP_VERSION=0.39.11
APP_NAME=littr
APP_VERSION=0.39.12
GOLANG_VERSION=1.23
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Dependency directories (remove the comment below to include it)
# vendor/

litter-go
#littr
.env
run_data/
.scannerwork/
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# litter-go / Makefile
# littr / Makefile
#

#
Expand All @@ -9,7 +9,7 @@
include .env.example
-include .env

APP_NAME=litter-go
APP_NAME=littr
APP_URLS_TRAEFIK?=`${HOSTNAME}`
PROJECT_NAME=${APP_NAME}
TZ=Europe/Vienna
Expand Down Expand Up @@ -51,8 +51,8 @@ DOCKER_IMAGE_TAG?=${REGISTRY}backend:${APP_VERSION}-go${GOLANG_VERSION}
DOCKER_INTERNAL_PORT?=8080
DOCKER_NETWORK_NAME?=traefik
DOCKER_USER?=littr
DOCKER_VOLUME_DATA_NAME?=litter-data
DOCKER_VOLUME_PIX_NAME?=litter-pix
DOCKER_VOLUME_DATA_NAME?=littr-data
DOCKER_VOLUME_PIX_NAME?=littr-pix

# define standard colors
# https://gist.github.com/rsperl/d2dfe88a520968fbc1f49db0a29345b9
Expand Down Expand Up @@ -133,8 +133,8 @@ docs: config
@mv docs/swagger.json api/swagger.json
@[ -f ".env" ] || cp .env.example .env
@[ -f ${DOCKER_COMPOSE_OVERRIDE} ] \
&& docker compose -f ${DOCKER_COMPOSE_FILE} -f ${DOCKER_COMPOSE_OVERRIDE} up litter-swagger -d --force-recreate \
|| docker compose -f ${DOCKER_COMPOSE_FILE} up litter-swagger -d --force-recreate
&& docker compose -f ${DOCKER_COMPOSE_FILE} -f ${DOCKER_COMPOSE_OVERRIDE} up littr-swagger -d --force-recreate \
|| docker compose -f ${DOCKER_COMPOSE_FILE} up littr-swagger -d --force-recreate

.PHONY: build
build:
Expand Down Expand Up @@ -200,7 +200,7 @@ version:
push:
@echo -e "\n${YELLOW} Pushing to git with tags... ${RESET}\n"
@git tag -fa 'v${APP_VERSION}' -m 'v${APP_VERSION}'
@git push --follow-tags
@git push --follow-tags --set-upstream origin master

.PHONY: sh
sh:
Expand Down Expand Up @@ -237,7 +237,7 @@ fetch_running_dump:
.PHONY: backup
backup: fetch_running_dump
@echo -e "\n${YELLOW} Making the backup archive... ${RESET}\n"
@tar czvf /mnt/backup/litter-go/$(shell date +"%Y-%m-%d-%H:%M:%S").tar.gz ${RUN_DATA_DIR}
@tar czvf /mnt/backup/littr/$(shell date +"%Y-%m-%d-%H:%M:%S").tar.gz ${RUN_DATA_DIR}

.PHONY: push_to_registry
push_to_registry:
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
![](/web/android-chrome-192x192.png)

# litter-go (littr)
# littr (formerly littr-go)

[![Go Reference](https://pkg.go.dev/badge/go.savla.dev/littr.svg)](https://pkg.go.dev/go.savla.dev/littr)
[![Go Report Card](https://goreportcard.com/badge/go.savla.dev/littr)](https://goreportcard.com/report/go.savla.dev/littr)
[![Go Reference](https://pkg.go.dev/badge/go.vxn.dev/littr.svg)](https://pkg.go.dev/go.vxn.dev/littr)
[![Go Report Card](https://goreportcard.com/badge/go.vxn.dev/littr)](https://goreportcard.com/report/go.vxn.dev/littr)

[![litter-go CI/CD test and build pipeline](https://github.com/krustowski/litter-go/actions/workflows/test-and-build.yml/badge.svg?branch=master)](https://github.com/krustowski/litter-go/actions/workflows/test-and-build.yml)
[![litter-go CI/CD deployment pipeline](https://github.com/krustowski/litter-go/actions/workflows/deployment.yml/badge.svg?branch=master)](https://github.com/krustowski/litter-go/actions/workflows/deployment.yml)
[![littr CI/CD test and build pipeline](https://github.com/krustowski/littr/actions/workflows/test-and-build.yml/badge.svg?branch=master)](https://github.com/krustowski/littr/actions/workflows/test-and-build.yml)
[![littr CI/CD deployment pipeline](https://github.com/krustowski/littr/actions/workflows/deployment.yml/badge.svg?branch=master)](https://github.com/krustowski/littr/actions/workflows/deployment.yml)

litter again, now in Go as a PWA --- a microblogging service without notifications (by default off) and pesky messaging, just a raw mind _flow_
littr again, now in Go as a PWA --- a nanoblogging service without notifications (by default off) and pesky messaging, just a raw mind _flow_

[read more](https://krusty.space/projects/litter/) (a blog post)
[read more](https://krusty.space/projects/littr/) (a blog post)

## repo vademecum

Expand Down Expand Up @@ -108,7 +108,7 @@ make flush kill run

## development

`litter-backend` container can be run locally on any dev machine (using Docker engine or using the required tag-locked Go runtime)
`littr-backend` container can be run locally on any dev machine (using Docker engine or using the required tag-locked Go runtime)

```
make dev
Expand Down Expand Up @@ -142,10 +142,10 @@ make fetch_running_dump
Copying dumped data from the container...
Successfully copied 13.8kB to /home/user/litter-go/run_data/
Successfully copied 4.61kB to /home/user/litter-go/run_data/
Successfully copied 26.1kB to /home/user/litter-go/run_data/
Successfully copied 3.07kB to /home/user/litter-go/run_data/
Successfully copied 13.8kB to /home/user/littr/run_data/
Successfully copied 4.61kB to /home/user/littr/run_data/
Successfully copied 26.1kB to /home/user/littr/run_data/
Successfully copied 3.07kB to /home/user/littr/run_data/
```

### nice-to-have(s)
Expand Down Expand Up @@ -296,7 +296,7 @@ Successfully copied 3.07kB to /home/user/litter-go/run_data/
+ ~~upgrade toasts to snackbars (beercss v3.3.5)~~
+ ~~disable buttons on action to prevent multiple action fires~~
+ ~~implement system stats, add flowers (follower) count~~
+ ~~add LitterJS external lib~~
+ ~~add littrJS external lib~~

### roadmap to v0.10
+ ~~implement search bar (`stats` and `users` pages only)~~
Expand Down
6 changes: 3 additions & 3 deletions api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"description": "nanoblogging platform as PWA built on go-app framework",
"title": "litter-go",
"title": "littr",
"termsOfService": "https://littr.eu/tos",
"contact": {
"name": "API Support",
Expand All @@ -11,9 +11,9 @@
},
"license": {
"name": "MIT",
"url": "https://github.com/krustowski/litter-go/blob/master/LICENSE"
"url": "https://github.com/krustowski/littr/blob/master/LICENSE"
},
"version": "0.39.11"
"version": "0.39.12"
},
"host": "littr.eu",
"basePath": "/api/v1",
Expand Down
12 changes: 6 additions & 6 deletions deployments/docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ networks:
name: ${DOCKER_NETWORK_NAME}

volumes:
litter-data:
littr-data:
name: ${DOCKER_VOLUME_DATA_NAME}
litter-pix:
littr-pix:
name: ${DOCKER_VOLUME_PIX_NAME}

services:
litter-backend-test:
littr-backend-test:
image: ${DOCKER_IMAGE_TAG}
container_name: ${DOCKER_CONTAINER_NAME}
env_file:
Expand All @@ -37,8 +37,8 @@ services:
mem_limit: 128m
mem_reservation: 32m
volumes:
- "litter-data:/opt/data"
- "litter-pix:/opt/pix"
- "littr-data:/opt/data"
- "littr-pix:/opt/pix"
ports:
- "${DOCKER_EXTERNAL_PORT}:${DOCKER_INTERNAL_PORT}"
networks:
Expand All @@ -58,7 +58,7 @@ services:
timeout: 5s
retries: 3

litter-swagger-test:
littr-swagger-test:
image: swaggerapi/swagger-ui
container_name: ${DOCKER_SWAGGER_CONTAINER_NAME}
ports:
Expand Down
13 changes: 6 additions & 7 deletions deployments/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#version: '3.9'
name: ${PROJECT_NAME}

networks:
Expand All @@ -7,13 +6,13 @@ networks:
external: true

volumes:
litter-data:
littr-data:
name: ${DOCKER_VOLUME_DATA_NAME}
litter-pix:
littr-pix:
name: ${DOCKER_VOLUME_PIX_NAME}

services:
litter-backend:
littr-backend:
image: ${DOCKER_IMAGE_TAG}
container_name: ${DOCKER_CONTAINER_NAME}
env_file:
Expand All @@ -38,8 +37,8 @@ services:
mem_limit: 128m
mem_reservation: 32m
volumes:
- "litter-data:/opt/data"
- "litter-pix:/opt/pix"
- "littr-data:/opt/data"
- "littr-pix:/opt/pix"
ports:
- "${DOCKER_EXTERNAL_PORT}:${DOCKER_INTERNAL_PORT}"
networks:
Expand Down Expand Up @@ -73,7 +72,7 @@ services:
timeout: 5s
retries: 3

litter-swagger:
littr-swagger:
image: swaggerapi/swagger-ui
container_name: ${DOCKER_SWAGGER_CONTAINER_NAME}
ports:
Expand Down

0 comments on commit cafe3ed

Please sign in to comment.