Skip to content

Commit

Permalink
Update formbricks
Browse files Browse the repository at this point in the history
  • Loading branch information
websoft9 committed Jan 9, 2025
1 parent d55ec0a commit 5916ea7
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 183 deletions.
65 changes: 25 additions & 40 deletions apps/formbricks/.env
Original file line number Diff line number Diff line change
@@ -1,47 +1,32 @@
W9_REPO=wordpress
W9_DIST=community
W9_VERSION=latest

W9_POWER_PASSWORD=1PrMxExC45LsCT

# Environments which for user settings when create application
# Named expression: W9_xxx_xxx_SET, xxx refer to file fields
W9_HTTP_PORT_SET=9001
# W9_HTTPS_PORT_SET=9002
# W9_DB_PORT_SET=3306
# W9_SSH_PORT_SET=23
W9_KEY_SET="dfsjdkjf77xjxcjcj"

#### -- Not allowed to edit below environments when recreate app based on existing data -- ####

W9_ID=formbricks

# W9_HTTP_PORT or W9_HTTPS_PORT is need at leaset and used for proxy for web application
# Some container (e.g teleport) need HTTPS access, then need to set this pra
W9_HTTP_PORT=80
W9_HTTPS_PORT=81

W9_LOGIN_USER=admin
# use https://1password.com/zh-cn/password-generator/ to genarate 14 bit password
# this password can also use password file
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD
W9_ADMIN_PATH="/wp-login"

# Container name's suffix must use one of the value
W9_DB_EXPOSE="mysql,postgresql,mariadb,mongodb,redis"

# It is used when the application APP needs to set an external URL, which can be IP(or domain), IP:PORT
# If have protocols, should be set it in the APP's ENV
W9_URL=internet_ip:$W9_HTTP_PORT_SET
# modifies W9_URL on init when it is true
W9_REPO=ghcr.io/formbricks/formbricks
W9_DIST='community'
W9_VERSION='latest'
W9_POWER_PASSWORD='!1zznO2ydWDEThwu'
W9_RCODE="1zznO2ydWDEThwu"
W9_HTTP_PORT_SET='9001'
W9_ID='formbricks'
W9_HTTP_PORT=3000
W9_DB_EXPOSE="postgresql"
W9_URL='internet_ip:$W9_HTTP_PORT_SET'
W9_URL_REPLACE=true

W9_NETWORK=websoft9

#### ----------------------------------------------------------------------------------------- ####

# Below environment is created by formbricks: https://github.com/formbricks/formbricks/blob/main/docker/docker-compose.yml

# Set this to your public-facing URL, e.g., https://example.com
WEBAPP_URL=http://$W9_URL

# Below environment is created by apphub
# Required for next-auth. Should be the same as WEBAPP_URL
NEXTAUTH_URL:http://$W9_URL

#W9_NAME=""
#W9_RCODE=""
DATABASE_URL="postgresql://postgres:$W9_RCODE@$W9_ID-postgresql:5432/formbricks?schema=public"
# You can use: `openssl rand -hex 32` to generate one
NEXTAUTH_SECRET=78f660893fc0e93a39d0378a06a884ccacf30dfee68e20d9400941a82753d0a7
# You can use: $(openssl rand -hex 32) to generate one
ENCRYPTION_KEY=78f660893fc0e93a39d0378a06a884ccacf30dfee68e20d9400941a82753d0a7
# You can use: $(openssl rand -hex 32) to generate a secure one
CRON_SECRET=78f660893fc0e93a39d0378a06a884ccacf30dfee68e20d9400941a82753d0a7
EMAIL_VERIFICATION_DISABLED=1
PASSWORD_RESET_DISABLED=1
21 changes: 0 additions & 21 deletions apps/formbricks/Dockerfile

This file was deleted.

16 changes: 14 additions & 2 deletions apps/formbricks/Notes.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# Appname
## FAQ
# Formbricks

## Installation mark

- NEXTAUTH_SECRET, ENCRYPTION_KEY, CRON_SECRET is need otherwise app can not start
- have disable email verfication for register

## Usage

Need create Admin account for the first use

## configs

- Multiple languages: Yes, but not include Chinese
43 changes: 13 additions & 30 deletions apps/formbricks/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,31 @@
# image,docs: https://hub.docker.com/_/wordpress/
# image: https://github.com/formbricks/formbricks/blob/main/docker/docker-compose.yml

services:

wordpress:
app:
image: $W9_REPO:$W9_VERSION
container_name: $W9_ID
restart: unless-stopped
#This is for access host from container
# extra_hosts: ["host.docker.internal:host-gateway"]
# command: |
# /bin/bash -c "ping -c 3 host.docker.internal"
logging:
driver: "json-file"
options:
max-file: "5"
max-size: 10m
deploy:
resources:
limits:
memory: 5g
cpus: '0.7'
ports:
- $W9_HTTP_PORT_SET:80
- $W9_HTTP_PORT_SET:3000
env_file: .env
volumes:
- wordpress:/var/www/html
- ./src/php_exra.ini:/usr/local/etc/php/conf.d/php_exra.ini
- formbricks:/home/nextjs/apps/web/uploads

mariadb:
image: mariadb:10.4
container_name: $W9_ID-mariadb
db:
image: pgvector/pgvector:pg17
container_name: $W9_ID-postgresql
restart: unless-stopped
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb_log_buffer_size=30M
volumes:
- mysql_data:/var/lib/mysql
- postgres:/var/lib/postgresql/data
environment:
MYSQL_DATABASE: $W9_ID
MYSQL_USER: $W9_ID
MYSQL_PASSWORD: $W9_POWER_PASSWORD
MYSQL_ROOT_PASSWORD: $W9_POWER_PASSWORD
POSTGRES_DB: formbricks
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${W9_RCODE}

volumes:
wordpress:
mysql_data:
formbricks:
postgres:

networks:
default:
Expand Down
1 change: 0 additions & 1 deletion apps/formbricks/src/after_up.sh

This file was deleted.

12 changes: 0 additions & 12 deletions apps/formbricks/src/encrypt.sh

This file was deleted.

3 changes: 0 additions & 3 deletions apps/formbricks/src/filelist

This file was deleted.

1 change: 0 additions & 1 deletion apps/formbricks/src/get_version.sh

This file was deleted.

57 changes: 0 additions & 57 deletions apps/formbricks/src/nginx-proxy.conf.template

This file was deleted.

8 changes: 0 additions & 8 deletions apps/formbricks/src/php_exra.ini

This file was deleted.

1 change: 0 additions & 1 deletion apps/formbricks/src/replace_url.sh

This file was deleted.

12 changes: 5 additions & 7 deletions apps/formbricks/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
"edition": [
{
"dist": "community",
"version": [
"latest"
]
"version": ["latest", "3.0.0"]
}
],
"requirements": {
"cpu": "2",
"memory": "4",
"disk": "10",
"url": "https://formbricks.com"
"cpu": "1",
"memory": "2",
"disk": "2",
"url": "https://formbricks.com/docs/self-hosting/overview"
}
}

0 comments on commit 5916ea7

Please sign in to comment.