-
Notifications
You must be signed in to change notification settings - Fork 0
Home
- Scaffold minimal/bare app skeleton
docker run --rm -v ${PWD}:/app ghcr.io/sgohl/wish:main bash -c 'cp -Rfv /www/app /app ; chmod -R 777 /app'
- Use this example
compose.yml
to begin
version: '2.4'
x-image: &IMAGE "ghcr.io/sgohl/wish:main"
x-appname: &APPNAME "myapp"
services:
*APPNAME:
container_name: *APPNAME
stop_signal: "9"
image: *IMAGE
volumes:
- ./app:/www/app
ports:
- "80:80"
environment:
APPNAME: "*APPNAME"
#env_file:
#- .env
- start container
docker compose up -d
Currently, I don't see a nice and clean way to support multiple response headers (per page request), since HTTP excepts two empty new lines to terminate the headers from the body/response which prevents from providing a function to add an arbitrary number of headers because it won't know when no more headers come.
You may print your headers yourself and make sure that no body is written before your own two empty lines.
The only header that is set here is set-cookie
within the Session
function to let browser set the cookie after Login.
Of course, Bash does not provide namespaces by itself. There was a discussion about prefixing the app's functions with a name and some separator, but I like the simplicity of the current naming convention. However, nobody stops you from using a prefix in your app so you may never collide with the main app or another app or plug.