Skip to content

Commit

Permalink
Merge pull request #75 from silinternational/develop
Browse files Browse the repository at this point in the history
Release 2.3.2 -- increase log retention
  • Loading branch information
briskt authored Aug 30, 2024
2 parents 4993ce1 + 8b476f6 commit 6300324
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 23 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/test-deploy-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Test, Deploy, Publish

on:
push:
branches: ["**"]
paths-ignore:
- 'terraform/**'

jobs:
tests:
Expand All @@ -17,7 +20,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Test
run: docker-compose -f actions-services.yml run --rm test ./scripts/test.sh
run: docker compose -f actions-services.yml run --rm test ./scripts/test.sh

deploy:
name: Deploy to AWS Lambda
Expand All @@ -41,7 +44,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy
run: docker-compose -f actions-services.yml run --rm app ./scripts/deploy.sh
run: docker compose -f actions-services.yml run --rm app ./scripts/deploy.sh

build-and-publish:
name: Build and Publish
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
FROM golang:1.18

RUN curl -o- -L https://slss.io/install | VERSION=3.7.5 bash && \
RUN curl -o- -L --proto "=https" https://slss.io/install | VERSION=3.7.5 bash && \
mv $HOME/.serverless/bin/serverless /usr/local/bin && \
ln -s /usr/local/bin/serverless /usr/local/bin/sls

WORKDIR /src

RUN curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
RUN curl -sSfL --proto "=https" https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | \
sh -s -- -b $(go env GOPATH)/bin

COPY ./ .
RUN go get ./...

EXPOSE 8080

CMD ["air"]
CMD ["air"]
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ demo: proxy ui app dbinit
./local_data.sh

proxy:
docker-compose up -d proxy
docker compose up -d proxy

ui:
docker-compose up -d ui
docker compose up -d ui

app:
docker-compose kill app
docker-compose rm -f app
docker-compose up -d app
docker compose kill app
docker compose rm -f app
docker compose up -d app

test: clean dbinit
docker-compose run --rm app go test ./...
docker compose run --rm app go test ./...

db:
docker-compose up -d dynamo
docker compose up -d dynamo

dbinit: db wait createwebauthntable createapikeytable

Expand Down Expand Up @@ -55,5 +55,5 @@ showwebauth:
--region localhost

clean:
docker-compose kill
docker-compose rm -f
docker compose kill
docker compose rm -f
2 changes: 0 additions & 2 deletions actions-services.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:
test:
build: .
Expand Down
2 changes: 0 additions & 2 deletions aws.env.encrypted

This file was deleted.

2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.7"

services:
proxy:
image: silintl/traefik-https-proxy
Expand Down
2 changes: 1 addition & 1 deletion serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider:
runtime: provided.al2
timeout: 5 # API Gateway invoked functions are limited to 30 seconds
versionFunctions: false
logRetentionInDays: 14
logRetentionInDays: 60
apiGateway:
shouldStartNameWithService: true

Expand Down
23 changes: 23 additions & 0 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ locals {
*/
module "serverless-user" {
source = "silinternational/serverless-user/aws"
version = "0.3.2"
version = "0.4.2"

app_name = "${var.app_name}-${var.app_env}"
aws_region = var.aws_region
aws_region_policy = "*"
enable_api_gateway = true
extra_policies = var.extra_policies
Expand Down

0 comments on commit 6300324

Please sign in to comment.