From 12507a57c950e38718849244530054625f218b26 Mon Sep 17 00:00:00 2001 From: Ainsof So'o Date: Thu, 11 Apr 2024 12:11:39 +1300 Subject: [PATCH] Revert "dockerfy" This reverts commit c83c8b6f9c4520e12892be939289a6b13f205839. --- .dockerignore | 1 - .env-default | 123 ------------------ .gitignore | 43 +----- README.md | 38 ------ docker-compose.yml | 317 --------------------------------------------- vite.config.js | 8 +- 6 files changed, 7 insertions(+), 523 deletions(-) delete mode 100644 .dockerignore delete mode 100644 .env-default delete mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 6b8710a..0000000 --- a/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/.env-default b/.env-default deleted file mode 100644 index 8be0363..0000000 --- a/.env-default +++ /dev/null @@ -1,123 +0,0 @@ -### Documentation available at https://wodby.com/docs/stacks/drupal/local -### Changelog can be found at https://github.com/wodby/docker4drupal/releases -### Images tags format explained at https://github.com/wodby/docker4drupal#images-tags - -### PROJECT SETTINGS - -PROJECT_NAME=sso_website_project -PROJECT_BASE_URL=sso.docker.localhost -PROJECT_PORT=8000 - -DB_NAME=sso -DB_USER=sso -DB_PASSWORD=sso -DB_ROOT_PASSWORD=password -DB_HOST=mariadb -DB_PORT=3306 -DB_DRIVER=mysql - -### --- MARIADB ---- - -MARIADB_TAG=10.11-3.26.2 -#MARIADB_TAG=11.0-3.26.2 -#MARIADB_TAG=10.10-3.26.2 -#MARIADB_TAG=10.9-3.26.2 -#MARIADB_TAG=10.6-3.26.2 -#MARIADB_TAG=10.5-3.26.2 -#MARIADB_TAG=10.4-3.26.2 - -### --- VANILLA DRUPAL ---- - -DRUPAL_TAG=10-4.56.5 -#DRUPAL_TAG=9-4.56.5 -#DRUPAL_TAG=7-4.56.5 - -### --- PHP ---- - -# Linux (uid 1000 gid 1000) - -PHP_TAG=8.2-dev-4.45.4 -#PHP_TAG=8.1-dev-4.45.4 -#PHP_TAG=8.0-dev-4.45.4 - -# macOS (uid 501 gid 20) - -#PHP_TAG=8.2-dev-macos-4.45.4 -#PHP_TAG=8.1-dev-macos-4.45.4 -#PHP_TAG=8.0-dev-macos-4.45.4 - -### --- NGINX ---- - -NGINX_TAG=1.25-5.33.2 -#NGINX_TAG=1.24-5.33.2 -#NGINX_TAG=1.25-5.33.2 - -NGINX_VHOST_PRESET=html -# NGINX_VHOST_PRESET=drupal10 -#NGINX_VHOST_PRESET=drupal9 -#NGINX_VHOST_PRESET=drupal8 -#NGINX_VHOST_PRESET=drupal7 - -### --- SOLR --- - -SOLR_TAG=8-4.18.2 -#SOLR_TAG=7-4.18.2 -#SOLR_TAG=6-4.18.2 -#SOLR_TAG=5-4.18.2 - -SOLR_CONFIG_SET="search_api_solr_4.1.6" -#SOLR_CONFIG_SET="search_api_solr_4.0.1" -#SOLR_CONFIG_SET="search_api_solr_8.x-3.9" -#SOLR_CONFIG_SET="search_api_solr_8.x-3.2" -#SOLR_CONFIG_SET="search_api_solr_8.x-2.7" -#SOLR_CONFIG_SET="search_api_solr_8.x-1.2" -#SOLR_CONFIG_SET="search_api_solr_7.x-1.14" - -### --- ELASTICSEARCH --- - -ELASTICSEARCH_TAG=7-5.18.10 -#ELASTICSEARCH_TAG=6-5.18.10 - -### --- KIBANA --- - -KIBANA_TAG=7-5.18.10 -#KIBANA_TAG=6-5.18.10 - -### --- REDIS --- - -REDIS_TAG=7-4.1.2 -#REDIS_TAG=6-4.1.2 -#REDIS_TAG=5-4.1.2 - -### --- NODE --- - -NODE_TAG=18-dev-1.24.0 -#NODE_TAG=16-dev-1.24.0 -#NODE_TAG=14-dev-1.24.0 - -### --- VARNISH --- - -VARNISH_TAG=6.0-4.14.2 -#VARNISH_TAG=4.1-4.14.2 - -### --- POSTGRESQL ---- - -POSTGRES_TAG=15-1.31.1 -#POSTGRES_TAG=14-1.31.1 -#POSTGRES_TAG=13-1.31.1 -#POSTGRES_TAG=12-1.31.1 -#POSTGRES_TAG=11-1.31.1 - -### OTHERS - -ADMINER_TAG=4-3.24.4 -APACHE_TAG=2.4-4.12.1 -ATHENAPDF_TAG=2.16.0 -DRUPAL_NODE_TAG=1.0-2.0.0 -MEMCACHED_TAG=1-2.15.2 -OPENSMTPD_TAG=6-1.18.2 -RSYSLOG_TAG=latest -SELENIUM_CHROME_TAG=3.141 -WEBGRIND_TAG=1-1.30.0 -XHPROF_TAG=3.7.6 -ZOOKEEPER_TAG=3.8 diff --git a/.gitignore b/.gitignore index 308c4be..6635cf5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,41 +1,10 @@ -# Ignore vim swp files and gedit temp files -*.swp -*.*~ -.vim - -# eclipse settings files -.project -.pydevproject -.settings -.buildpath - -# netbeans settings files -nbproject - -# Ignore OS settings files -.DS_Store* -Thumbs.db -ehthumbs.db - -# Ignore files generated by PhpStorm -.idea - -# Ignore docker files -docker-compose.override.yml -docker-init/files - -# and some random server stuff -.bash_history -.bashrc -errors.log -.docker-sync/ -mutagen.yml.lock -.vscode - -# svelete stuff +.DS_Store +node_modules +/build /.svelte-kit +/package .env .env.* !.env.example -node_modules/ -/build +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/README.md b/README.md index d96b67a..e7724a2 100644 --- a/README.md +++ b/README.md @@ -60,44 +60,6 @@ To create a production version of your app: npm run build ``` -## Working with Docker - -You need docker and docker compose installed for the following steps. - -Copy .env-default as .env - -```bash -cp .env-default .env -``` - -Start containers - -```bash -docker compose up -d -``` - -Access the dev environment on http://sso.docker.localhost:5173 - -To run node commands on CLI run: - -```bash -docker compose exec node sh -``` - -Then execute your commands e.g. npm run build - -### Tip: Use alias' - -```bash -alias dlup='docker compose up -d; docker compose logs -f node' -alias dup='docker compose up -d' -alias dstop='docker compose stop' -alias dnode='docker compose exec node bash' -alias dlnode='docker compose logs -f node' -alias dc='docker compose' -``` - - You can preview the production build with `npm run preview`. ## Contributing diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index b8d4afe..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,317 +0,0 @@ -version: "3.7" - -services: -# mariadb: -# image: wodby/mariadb:$MARIADB_TAG -# container_name: "${PROJECT_NAME}_mariadb" -# stop_grace_period: 30s -# environment: -# MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD -# MYSQL_DATABASE: $DB_NAME -# MYSQL_USER: $DB_USER -# MYSQL_PASSWORD: $DB_PASSWORD -# # volumes: -# # - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here. -# # - /path/to/mariadb/data/on/host:/var/lib/mysql # Use bind mount - -# php: -# image: wodby/drupal-php:$PHP_TAG -# container_name: "${PROJECT_NAME}_php" -# environment: -# SSMTP_MAILHUB: mailhog:1025 -# # SSMTP_MAILHUB: opensmtpd:25 -# PHP_SENDMAIL_PATH: '"/usr/bin/dos2unix -u | /usr/sbin/ssmtp -t -f"' -# # DB_HOST: $DB_HOST -# # DB_PORT: $DB_PORT -# # DB_USER: $DB_USER -# # DB_PASSWORD: $DB_PASSWORD -# # DB_NAME: $DB_NAME -# # DB_DRIVER: $DB_DRIVER -# # DRUSH_OPTIONS_URI: "http://${PROJECT_BASE_URL}:${PROJECT_PORT}" -# # PHP_FPM_USER: wodby -# # PHP_FPM_GROUP: wodby -# # COLUMNS: 80 # Set 80 columns for docker exec -it. -# # # Read instructions at https://wodby.com/docs/stacks/php/local/#xdebug -# # PHP_XDEBUG: 1 -# # PHP_XDEBUG_MODE: debug -# # PHP_XDEBUG_MODE: profile -# # PHP_XDEBUG_USE_COMPRESSION: false -# # PHP_IDE_CONFIG: serverName=my-ide -# # PHP_XDEBUG_IDEKEY: "my-ide" -# # PHP_XDEBUG_CLIENT_HOST: 172.17.0.1 # Linux -# # PHP_XDEBUG_CLIENT_HOST: host.docker.internal # Docker 18.03+ Mac/Win -# # PHP_XDEBUG_CLIENT_HOST: 10.0.75.1 # Windows, Docker < 18.03 -# # PHP_XDEBUG_LOG: /tmp/php-xdebug.log -# # # PHPUnit Drupal testing configurations -# # SIMPLETEST_BASE_URL: "http://nginx" -# # SIMPLETEST_DB: "${DB_DRIVER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}#tests_" -# # MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","goog:chromeOptions":{"args":["--disable-gpu","--headless"]}}, "http://chrome:9515"]' -# volumes: -# - ./:/var/www/html:cached -# ## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/drupal/local#docker-for-mac -# # - drupal:/var/www/html -# ## For XHProf and Xdebug profiler traces -# # - files:/mnt/files - -# crond: -# image: wodby/drupal-php:$PHP_TAG -# container_name: "${PROJECT_NAME}_crond" -# environment: -# CRONTAB: "0 * * * * drush -r /var/www/html/web cron" -# command: sudo -E crond -f -d 0 -# volumes: -# - ./:/var/www/html:cached -# ## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/drupal/local#docker-for-mac -# # - drupal:/var/www/html - - nginx: - image: wodby/nginx:$NGINX_TAG - container_name: "${PROJECT_NAME}_nginx" - # depends_on: - # - php - environment: - NGINX_STATIC_OPEN_FILE_CACHE: "off" - NGINX_ERROR_LOG_LEVEL: debug - # NGINX_BACKEND_HOST: html - NGINX_SERVER_ROOT: /var/www/html/static - NGINX_VHOST_PRESET: $NGINX_VHOST_PRESET - # NGINX_DRUPAL_FILE_PROXY_URL: http://example.com - volumes: - - ./:/var/www/html:cached -## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/drupal/local#docker-for-mac -# - drupal:/var/www/html - labels: - - "traefik.http.routers.${PROJECT_NAME}_nginx.rule=Host(`${PROJECT_BASE_URL}`)" - -# mailhog: -# image: mailhog/mailhog -# container_name: "${PROJECT_NAME}_mailhog" -# labels: -# - "traefik.http.services.${PROJECT_NAME}_mailhog.loadbalancer.server.port=8025" -# - "traefik.http.routers.${PROJECT_NAME}_mailhog.rule=Host(`mailhog.${PROJECT_BASE_URL}`)" - -# postgres: -# image: wodby/postgres:$POSTGRES_TAG -# container_name: "${PROJECT_NAME}_postgres" -# stop_grace_period: 30s -# environment: -# POSTGRES_PASSWORD: $DB_PASSWORD -# POSTGRES_DB: $DB_NAME -# POSTGRES_USER: $DB_USER -# POSTGRES_DB_EXTENSIONS: pg_trgm -# volumes: -# - ./postgres-init:/docker-entrypoint-initdb.d # Place init file(s) here. -# - /path/to/postgres/data/on/host:/var/lib/postgresql/data # Use bind mount - -# apache: -# image: wodby/apache:$APACHE_TAG -# container_name: "${PROJECT_NAME}_apache" -# depends_on: -# - php -# environment: -# APACHE_LOG_LEVEL: debug -# APACHE_BACKEND_HOST: php -# APACHE_VHOST_PRESET: php -# APACHE_DOCUMENT_ROOT: /var/www/html/web -# volumes: -# - ./:/var/www/html:cached -## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/drupal/local#docker-for-mac -# - drupal:/var/www/html - -# labels: -# - "traefik.http.routers.${PROJECT_NAME}_apache.rule=Host(`${PROJECT_BASE_URL}`)" - -# varnish: -# image: wodby/varnish:$VARNISH_TAG -# container_name: "${PROJECT_NAME}_varnish" -# depends_on: -# - nginx -# environment: -# VARNISH_SECRET: secret -# VARNISH_BACKEND_HOST: nginx -# VARNISH_BACKEND_PORT: 80 -# VARNISH_CONFIG_PRESET: drupal -# VARNISH_ALLOW_UNRESTRICTED_PURGE: 1 -# labels: -# - "traefik.http.services.${PROJECT_NAME}_varnish.loadbalancer.server.port=6081" -# - "traefik.http.routers.${PROJECT_NAME}_varnish.rule=Host(`varnish.${PROJECT_BASE_URL}`)" - -# redis: -# container_name: "${PROJECT_NAME}_redis" -# image: wodby/redis:$REDIS_TAG - -# adminer: -# container_name: "${PROJECT_NAME}_adminer" -# image: wodby/adminer:$ADMINER_TAG -# environment: -# # For PostgreSQL: -# # ADMINER_DEFAULT_DB_DRIVER: pgsql -# ADMINER_DEFAULT_DB_HOST: $DB_HOST -# ADMINER_DEFAULT_DB_NAME: $DB_NAME -# labels: -# - "traefik.http.routers.${PROJECT_NAME}_adminer.rule=Host(`adminer.${PROJECT_BASE_URL}`)" - -# pma: -# image: phpmyadmin/phpmyadmin -# container_name: "${PROJECT_NAME}_pma" -# environment: -# PMA_HOST: $DB_HOST -# PMA_USER: $DB_USER -# PMA_PASSWORD: $DB_PASSWORD -# UPLOAD_LIMIT: 1G -# labels: -# - "traefik.http.routers.${PROJECT_NAME}_pma.rule=Host(`pma.${PROJECT_BASE_URL}`)" - -# solr: -# image: wodby/solr:$SOLR_TAG -# container_name: "${PROJECT_NAME}_solr" -# environment: -## SOLR_DEFAULT_CONFIG_SET: $SOLR_CONFIG_SET -# ZK_HOST: zookeeper:2181 -# SOLR_HEAP: 1024m -# depends_on: -# - zookeeper -# labels: -# - "traefik.http.services.${PROJECT_NAME}_solr.loadbalancer.server.port=8983" -# - "traefik.http.routers.${PROJECT_NAME}_solr.rule=Host(`solr.${PROJECT_BASE_URL}`)" - -# zookeeper: -# image: zookeeper:$ZOOKEEPER_TAG -# container_name: "${PROJECT_NAME}_zookeeper" -# environment: -# ZOO_MY_ID: 1 -# ZOO_SERVERS: server.1=zookeeper:2888:3888;2181 -# ZOO_4LW_COMMANDS_WHITELIST: mntr, conf, ruok - -# drupal-node: -# image: wodby/drupal-node:$DRUPAL_NODE_TAG -# container_name: "${PROJECT_NAME}_drupal_nodejs" -# labels: -# - "traefik.http.routers.${PROJECT_NAME}_drupal_node.rule=Host(`drupal_node.${PROJECT_BASE_URL}`)" -# environment: -# NODE_SERVICE_KEY: node-service-key - -# memcached: -# container_name: "${PROJECT_NAME}_memcached" -# image: wodby/memcached:$MEMCACHED_TAG - -# rsyslog: -# container_name: "${PROJECT_NAME}_rsyslog" -# image: wodby/rsyslog:$RSYSLOG_TAG - -# athenapdf: -# image: arachnysdocker/athenapdf-service:$ATHENAPDF_TAG -# container_name: "${PROJECT_NAME}_athenapdf" -# environment: -# WEAVER_AUTH_KEY: weaver-auth-key -# WEAVER_ATHENA_CMD: "athenapdf -S" -# WEAVER_MAX_WORKERS: 10 -# WEAVER_MAX_CONVERSION_QUEUE: 50 -# WEAVER_WORKER_TIMEOUT: 90 -# WEAVER_CONVERSION_FALLBACK: "false" - - node: - image: wodby/node:$NODE_TAG - container_name: "${PROJECT_NAME}_node" - working_dir: /var/www/html - labels: - - "traefik.http.services.${PROJECT_NAME}_node.loadbalancer.server.port=5173" - - "traefik.http.routers.${PROJECT_NAME}_node.rule=Host(`${PROJECT_BASE_URL}`)" - expose: - - "5173" - ports: - - 5173:5173 - volumes: - - ./:/var/www/html - command: sh -c 'npm i && npm run dev' - -# webgrind: -# image: wodby/webgrind:$WEBGRIND_TAG -# container_name: "${PROJECT_NAME}_webgrind" -# environment: -# WEBGRIND_PROFILER_DIR: /mnt/files/xdebug -# labels: -# - "traefik.http.routers.${PROJECT_NAME}_webgrind.rule=Host(`webgrind.${PROJECT_BASE_URL}`)" -# volumes: -# - files:/mnt/files -# - ./:/mnt/codebase:cached - -# elasticsearch: -# image: wodby/elasticsearch:$ELASTICSEARCH_TAG -# container_name: "${PROJECT_NAME}_elasticsearch" -# environment: -# ES_JAVA_OPTS: "-Xms500m -Xmx500m" -# ulimits: -# memlock: -# soft: -1 -# hard: -1 - -# kibana: -# image: wodby/kibana:$KIBANA_TAG -# container_name: "${PROJECT_NAME}_kibana" -# depends_on: -# - elasticsearch -# labels: -# - "traefik.http.services.${PROJECT_NAME}_kibana.loadbalancer.server.port=5601" -# - "traefik.http.routers.${PROJECT_NAME}_kibana.rule=Host(`kibana.${PROJECT_BASE_URL}`)" - -# opensmtpd: -# container_name: "${PROJECT_NAME}_opensmtpd" -# image: wodby/opensmtpd:$OPENSMTPD_TAG - -# xhprof: -# image: wodby/xhprof:$XHPROF_TAG -# container_name: "${PROJECT_NAME}_xhprof" -# restart: always -# volumes: -# - files:/mnt/files -# labels: -# - "traefik.http.routers.${PROJECT_NAME}_xhprof.rule=Host(`xhprof.${PROJECT_BASE_URL}`)" - -# chrome: -# image: selenium/standalone-chrome:$SELENIUM_CHROME_TAG -# container_name: "${PROJECT_NAME}_chrome" -# volumes: -# - /dev/shm:/dev/shm -# entrypoint: -# - chromedriver -# - "--no-sandbox" -# - "--disable-dev-shm-usage" -# - "--log-path=/tmp/chromedriver.log" -# - "--verbose" -# - "--whitelisted-ips=" - - traefik: - image: traefik:v2.0 - container_name: "${PROJECT_NAME}_traefik" - command: --api.insecure=true --providers.docker - ports: - - '${PROJECT_PORT-8000}:80' -# - '8080:8080' # Dashboard - volumes: - - /var/run/docker.sock:/var/run/docker.sock - -#x-mutagen: -# sync: -# defaults: -# ignore: -# vcs: true -# paths: -# - .DS_Store -# - .history -# - .idea -# drupal: -# alpha: "." -# beta: "volume://drupal" -# configurationBeta: -# permissions: -# defaultFileMode: 0644 -# defaultDirectoryMode: 0755 -# defaultOwner: "id:501" -# defaultGroup: "id:20" - -volumes: -## For macOS users (Mutagen) -# drupal: -# For Xdebug profiler - files: diff --git a/vite.config.js b/vite.config.js index 29959b2..eefe408 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,11 +3,5 @@ import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; export default defineConfig({ - plugins: [sveltekit(), purgeCss()], - server: { - host: true, - hmr: { - host: 'localhost' - } - } + plugins: [sveltekit(), purgeCss()] });