Skip to content

Commit

Permalink
publish to docker hub, WIP: change name to silex-platform
Browse files Browse the repository at this point in the history
  • Loading branch information
lexoyo committed Nov 14, 2024
1 parent 9993a73 commit 12c5c42
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/docker-hub-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish DockerHub image
# from https://itsmetommy.com/2021/07/05/push-to-docker-hub-using-github-actions/

on:
push:
tags:
- '*'

jobs:
build-container:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: silexlabs/silex-platform

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,41 @@ This code adds features to the editor specific to our instance (in `index.js` an
* [x] Enable or disable cloud services and hosting providers with env vars
* [ ] Analytics: add a tag in Silex editor

## Run the code

### With Docker

```bash
docker run -p 8080:8080 silexlabs/silex-instances
```

Add environment variables to customize the instance - here is an example with FTP storage and FTP hosting:

```bash
docker run -p 8080:8080 -e STORAGE_CONNECTORS=ftp -e HOSTING_CONNECTORS=ftp,download silexlabs/silex-instances
```

More info:

* [Env vars are described below](#environment-variables)
* [Docker Hub](https://hub.docker.com/r/silexlabs/silex-instances)
* [Dockerfile](Dockerfile)
* [What is storage and hosting](https://docs.silex.me/en/dev/connect)

### With Node.js

```bash
npm install
npm start
```

Or for development:

```bash
npm install
npm run dev
```

## Environment variables

You can set the following environment variables to customize the instance:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "editor.silex.me",
"name": "@silexlabs/silex-platform",
"version": "1.0.158",
"description": "This repo holds the code for the free public Silex instance hosted by Silex Labs foundation",
"scripts": {
Expand Down

0 comments on commit 12c5c42

Please sign in to comment.