diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 992b3e0e8..f9ae05f30 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -2,7 +2,7 @@ name: 'Alpha Build' on: push: - branches: [v512/palette-bug] + branches: [v530/custom-colour] jobs: frontend: @@ -104,6 +104,39 @@ jobs: platforms: linux/amd64 push: true + documentation: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Read VERSION + id: package + uses: martinbeentjes/npm-get-version-action@master + - name: Echo VERSION + run: echo ${{ steps.package.outputs.current-version }} + - name: Setup QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: all + - name: Setup BuildX + uses: docker/setup-buildx-action@v2 + id: buildx + with: + install: true + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_NEW_USERNAME }} + password: ${{ secrets.DOCKER_NEW_PASSWORD }} + - name: Build and push Documentation + uses: docker/build-push-action@v4 + with: + builder: ${{ steps.buildx.outputs.name }} + file: docs/Dockerfile + context: docs + tags: retrospected/docs:alpha + platforms: linux/amd64 + push: true + integration: runs-on: ubuntu-latest needs: [frontend, backend] diff --git a/docs/docs/self-hosting/optionals.md b/docs/docs/self-hosting/optionals.md index 4b66dc142..5edce427a 100644 --- a/docs/docs/self-hosting/optionals.md +++ b/docs/docs/self-hosting/optionals.md @@ -120,6 +120,11 @@ services: FRONTEND_DEFAULT_LANGUAGE: 'en-GB' # Set the default language for new users FRONTEND_MARKETING_ROOT: 'https://www.retrospected.com' # URL of the marketing website FRONTEND_AI_FEEDBACK_URL: 'http://' # URL of a freeform feedback form for AI feedback + FRONTEND_PRIMARY_COLOR: # List of 14 colours representing the primary color. See documentation. + FRONTEND_SECONDARY_COLOR: # List of 14 colours representing the primary color. See documentation. + FRONTEND_HEADER_PRIMARY_COLOR: # Colour of the header. If not set, the Primary color will be used. See Documentation. + FRONTEND_HEADER_SECONDARY_COLOR: # Secondary Colour of the header. See Documentation. + FRONTEND_LOGO: # image data URL representation of the logo. See documentation. # -- Do Not Change -- BACKEND_HOST: backend # This should be the name of the backend service diff --git a/docs/docs/self-hosting/quick-start/ComposeView.tsx b/docs/docs/self-hosting/quick-start/ComposeView.tsx index 3931be8dd..485c1af06 100644 --- a/docs/docs/self-hosting/quick-start/ComposeView.tsx +++ b/docs/docs/self-hosting/quick-start/ComposeView.tsx @@ -26,6 +26,11 @@ type ComposeViewSettings = { smtpUser: string; smtpPassword: string; smtpSender: string; + primaryColours: string; + secondaryColours: string; + primaryHeaderColour: string; + secondaryHeaderColour: string; + logo: string; }; type ComposeViewProps = { @@ -38,6 +43,10 @@ function p(condition: boolean, key: string, value: string, number = false) { : null; } +function d(value: string) { + return value ? `'${value}'` : '# Not provided. Using defaults.'; +} + export default function ComposeView({ settings: { dbPassword, @@ -61,6 +70,11 @@ export default function ComposeView({ smtpUser, smtpPassword, smtpSender, + primaryColours, + secondaryColours, + primaryHeaderColour, + secondaryHeaderColour, + logo, }, }: ComposeViewProps) { const optionals = [ @@ -86,6 +100,12 @@ services: ports: - '${port}:80' restart: unless-stopped + environment: + FRONTEND_PRIMARY_COLOURS: ${d(primaryColours)} + FRONTEND_SECONDARY_COLOURS: ${d(secondaryColours)} + FRONTEND_PRIMARY_HEADER_COLOUR: ${d(primaryHeaderColour)} + FRONTEND_SECONDARY_HEADER_COLOUR: ${d(secondaryHeaderColour)} + FRONTEND_LOGO: ${d(logo)} logging: driver: 'json-file' options: diff --git a/docs/docs/self-hosting/quick-start/Editor.tsx b/docs/docs/self-hosting/quick-start/Editor.tsx index 689909505..8cf4351de 100644 --- a/docs/docs/self-hosting/quick-start/Editor.tsx +++ b/docs/docs/self-hosting/quick-start/Editor.tsx @@ -62,6 +62,23 @@ export default function Editor() { '' ); const [smtpSender, setSmtpSender] = usePersistedState('smtp-sender', ''); + const [primaryColours, setPrimaryColours] = usePersistedState( + 'primary-colours', + '' + ); + const [secondaryColours, setSecondaryColours] = usePersistedState( + 'secondary-colours', + '' + ); + const [primaryHeaderColour, setPrimaryHeaderColour] = usePersistedState( + 'primary-header-colour', + '' + ); + const [secondaryHeaderColour, setSecondaryHeaderColour] = usePersistedState( + 'secondary-header-colour', + '' + ); + const [logo, setLogo] = usePersistedState('logo', ''); useEffect(() => { if (isBrowser) { @@ -242,6 +259,49 @@ export default function Editor() { ) : null} + +

+ More documentation here:{' '} + white-labelling documentation. +

+
+ + + + + +
+

Your customised docker-compose file:

2 - Run Docker

diff --git a/docs/docs/self-hosting/quick-start/Field.tsx b/docs/docs/self-hosting/quick-start/Field.tsx index af28b8bc9..c64b46d7a 100644 --- a/docs/docs/self-hosting/quick-start/Field.tsx +++ b/docs/docs/self-hosting/quick-start/Field.tsx @@ -4,6 +4,7 @@ import styles from './Field.module.css'; export type FieldProps = { label: string; description?: string; + placeholder?: string; }; type InputFieldProps = FieldProps & { @@ -31,11 +32,13 @@ export function InputField({ label, description, number, + placeholder, onChange, }: InputFieldProps) { return ( + - Retrospected Icon - Retrospected + Retrospected Icon + {!config.LOGO ? ( + Retrospected + ) : null} diff --git a/self-hosting/docker-compose.full.yml b/self-hosting/docker-compose.full.yml index a80005408..672f728cf 100644 --- a/self-hosting/docker-compose.full.yml +++ b/self-hosting/docker-compose.full.yml @@ -59,7 +59,7 @@ services: DB_PASSWORD: postgres # Must be the same as POSTGRES_PASSWORD above SESSION_SECRET: changeme # Session secret. Can be anything you want, but change the default value - # -- Optional -- + # -- Optional -- REDIS_ENABLED: 'true' # Whether to enable Redis REDIS_FOR_SOCKETIO_ENABLED: 'false' # Whether Socket.IO uses Redis (set to true when using more than 1 backend replica) REDIS_PORT: 6379 # Should match the Redis port @@ -125,7 +125,7 @@ services: RATE_LIMIT_WS_POINTS: 600 # Websocket rate limiting, max messages per duration RATE_LIMIT_WS_DURATION: 60 # Websocket rate limiting, window duration (in seconds) WS_MAX_BUFFER_SIZE: 10000 # Max websocket message size in bytes - + restart: unless-stopped logging: driver: 'json-file' @@ -148,6 +148,11 @@ services: FRONTEND_DEFAULT_LANGUAGE: 'en-GB' # Set the default language for new users FRONTEND_MARKETING_ROOT: 'https://www.retrospected.com' # URL of the marketing website FRONTEND_AI_FEEDBACK_URL: 'http://' # URL of a freeform feedback form for AI feedback + FRONTEND_PRIMARY_COLOR: # List of 14 colours representing the primary color. See documentation. + FRONTEND_SECONDARY_COLOR: # List of 14 colours representing the primary color. See documentation. + FRONTEND_HEADER_PRIMARY_COLOR: # Colour of the header. If not set, the Primary color will be used. See Documentation. + FRONTEND_HEADER_SECONDARY_COLOR: # Secondary Colour of the header. See Documentation. + FRONTEND_LOGO: # image data URL representation of the logo. See documentation. # -- Do Not Change -- BACKEND_HOST: backend # This should be the name of the backend service