Skip to content

Instantly share code, notes, and snippets.

@warlock
Last active January 16, 2024 10:44
Show Gist options
  • Save warlock/3bd19e51bad664560036da8721cc1d08 to your computer and use it in GitHub Desktop.
Save warlock/3bd19e51bad664560036da8721cc1d08 to your computer and use it in GitHub Desktop.
fnproject docker-compose and remote deployment
# ~/.fn/config.yaml
cli-version: 0.5.96
current-context: default
api-url: http://192.168.0.69:8080
provider: default
registry: http://192.168.0.69:5000
version: '3.8'
services:
fnproject-srv:
image: fnproject/fnserver
restart: always
ports:
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ~/data/app:/app/data
- ~/data/iofs:/iofs
fnproject-ui:
image: fnproject/ui
restart: always
depends_on:
- fnproject-srv
links:
- "fnproject-srv:api"
ports:
- "4000:4000"
environment:
- FN_API_URL=http://api:8080
- FN_IOFS_PATH=/iofs
# llistar llocs on es pot fer deploy
fn list contexts
# crear un context nou
fn create context <context> --api-url foo --provider bar --registry <dockerhub-username>
# usar un context especific
fn use context <context>
# actualitzar context la url del server
fn update context api-url http://localhost:8080
# actualitzar context el user del registry
fn update context registry hexley
# crear nova app
fn create app crawlers
# crrear funcio
fn init --runtime node rss
fn deploy --appp
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment