Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample app using Openresty & GBC framework

Install openresty via asdf

asdf plugin add openresty https://github.com/baysao/asdf-openresty.git
asdf list all openresty
asdf install openresty v1.21.4.1

Install GBC via asdf

asdf plugin add gbc https://github.com/baysao/asdf-gbc.git
asdf list all gbc
asdf install gbc v0.0.13

Clone sample app

git clone https://github.com/baysao/resty-app app

Sample start with docker-compose

Create file docker-compose.yml

services:
  app:
    privileged: true
    restart: unless-stopped
    image: ubuntu:focal
    container_name: sample_app
    entrypoint: "sleep infinity"
    volumes:
      - ./app:/app:rw
      - /root/.asdf:/root/.asdf:rw

Start docker

docker-compose up -d

Setup app

docker exec -it sample_app bash

Register GBC version, ex v0.0.13

cd /app

ln -sfn /root/.asdf/installs/gbc/v0.0.13 gbc

Register openresty version, ex v1.21.4.1

cd /app/bin/

ln -snf ~/.asdf/installs/openresty/v1.21.4.1/openresty

Start app

cd /app
./start_server

Check app status

cd /app
./cmd_server status

Restart app

cd /app/
./cmd_server restart nginx

Open web app via url address of docker instance, ex: http://127.0.0.1/portal

About

Sample app using Openresty & GBC framework

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages