Commit Graph

4067 Commits

Author SHA1 Message Date
Chris Raible
05127ddc5c
Reorganized docker related files (#21650)
ref https://linear.app/ghost/issue/ENG-1782/move-docker-related-files-to-a-better-location-that-githubscripts

- The docker files are currently located in `.github/scripts`. This location doesn't make a lot of sense — you wouldn't think to look there unless you already knew they were there. This also requires you to specify the path to the `compose.yml` file whenever running a `docker compose ...` command. 
- This commit moves the `compose.yml` file to the root of the repo, so you can simply run `docker compose up` and it will automatically find the file in the root, without having to specify `-f .github/scripts/docker-compose.yml`. This is a major win for convenience over the current setup.
- It also moves all the related files, including the `Dockerfile` used by the Dev Container setup and configuration files for supporting services into a new `.docker` directory, which is a more logical location, and should be easier to find.
- Also updated the current convenience commands in the `package.json` scripts block (`yarn docker:reset` and `yarn docker:down`
2024-11-19 13:15:06 -08:00
Chris Raible
af0f26c75f
Added Dev Container setup (#21279)
no issue

- Dev Containers let you work on Ghost in a consistent, isolated
environment with all the necessary development dependencies
pre-installed. VSCode (or Cursor) can effectively run _inside_ the
container, providing a local quality development environment while
working in a well-defined, isolated environment.
- For now the default setup only works with "Clone repository in
Container Volume" or "Clone PR in Container Volume" — this allows for a
super quick and simple setup. We can also introduce another
configuration to allow opening an existing local checkout in a Dev
Container, but that's not quite ready yet.
- This PR also added the `yarn clean:hard` command which: deletes all
node_modules, cleans the yarn cache, and cleans the NX cache. This will
be necessary for opening a local checkout in a Dev Container.
- To learn more about Dev Containers, read this guide from VSCode:
https://code.visualstudio.com/docs/devcontainers/containers#_personalizing-with-dotfile-repositories

---------

Co-authored-by: Joe Grigg <joe@ghost.org>
Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-10-24 11:15:08 -07:00
Daniel Lockyer
6a49d7f69f Configured yarn setup to build TS projects
- we need this to happen before running the setup script because TS
  dependencies won't be compiled at this point
2024-10-16 14:36:01 +02:00
renovate[bot]
a8f9b45038 Update dependency @actions/core to v1.11.1 2024-10-15 14:54:31 +02:00
renovate[bot]
747632bf45 Update dependency nx to v19.8.4 2024-10-08 07:40:09 +01:00
Hannah Wolfe
bce5d9d588
Updated tinybird tooling with usability improvements (#21185)
- Added yarn command to update TB CLI, as that needs doing frequently and I can never remember the command
- Improved safety & usability of tinybird test script by ensuring branches are correctly created before running & adding optional delete
- Updated tinybird test to warn only for sanity check as that's not always a valid check (Will prob remove soon)
- Improved output of tinybird test script on failure, so that the diff is readable and closer to what git shows you
- Added tool to convert tinybird ndjson to csv to make it easier to bring the data into google sheets for verifying numbers
2024-10-02 15:28:39 +01:00
renovate[bot]
9834f0946c Update dependency nx to v19.8.3 2024-10-02 08:38:19 +02:00
renovate[bot]
b4f2e03ae2 Update dependency nx to v19.8.2 2024-09-30 09:10:20 +02:00
Daniel Lockyer
5a72c5ad91 Updated Nx to v19
refs https://github.com/nrwl/nx/releases/tag/19.8.0

- this commit updates Nx to v19
- we need to add some extra commands to the dev script to stop and
  restart the Nx daemon, so it's ready and running before we execute a
  bunch of Nx commands concurrently
- this also updates nx.json to the format needed for the latest version
2024-09-25 10:16:08 +02:00
Daniel Lockyer
ae8f8f128b Added version bumping script to repo
ref https://linear.app/tryghost/issue/DEV-25/move-version-bumping-logic-into-ghost-repo

- we're slowly migrating our build code into the OSS repo, which means
  we need to move scripts over
- we have this as a bash script, but I've rewritten it to JS so it's a
  little more maintainable
- this script will just bump the version in the package.json files and
  set the GHA output
2024-09-24 09:11:54 +02:00
Sam Lord
625c89e37f
Added the ability to run browser tests using local Portal (#20990)
ref DOGM-32

Using the dev script as a template, this script runs the tests with
local copies of the applications needed instead of the released CDN
versions
2024-09-12 15:55:47 +01:00
Daniel Lockyer
3aaa5d3a70 Removed yarn from main:submodules
- we don't really need to run `yarn` here, as it pulls down all the
  dependencies for the 2 themes
- we rarely need these locally, and it's also slowing down CI, so we can
  just remove it from here for now
2024-09-11 12:41:38 +02:00
renovate[bot]
84b45581b6 Update dependency lint-staged to v15.2.10 2024-09-03 09:30:56 +02:00
Hannah Wolfe
e41984d0a5
Initial tinybird setup
ref https://linear.app/tryghost/issue/ANAL-27/setup-tinybird-project-and-cicd

- Tinybird has a system for managing it's configuration as code, with full ci/cd support
- The tinybird CLI tool uses python, so we'll run that using docker, via `yarn tb`
- Some of the files tinybird adds should not be in source control, so we've added those to git ignore
- Everything in /ghost/tinybird is tinybird's init config
2024-08-29 16:56:51 +01:00
renovate[bot]
f3e1ec7ddf Update dependency lint-staged to v15.2.9 2024-08-14 15:36:13 +02:00
renovate[bot]
779f9d1923 Update dependency rimraf to v5.0.10 2024-08-05 12:14:04 +02:00
renovate[bot]
4b28812861 Update TryGhost packages 2024-08-05 12:12:34 +02:00
renovate[bot]
0a1920ff2c Update dependency lint-staged to v15.2.8 2024-08-05 09:18:35 +02:00
renovate[bot]
74a67855f4 Update dependency rimraf to v5.0.9 2024-07-22 12:36:54 +02:00
renovate[bot]
c360fe5a2f Update dependency rimraf to v5.0.8 2024-07-22 09:11:14 +02:00
Steve Larson
9d15aef243
Updated timezone dependency (#20570)
ref https://linear.app/tryghost/issue/ENG-1266
- Mexico changed tz to not participate in DST
- our package was a couple years behind, so we likely have fixes for
other countries/regions, too
2024-07-09 16:31:36 -05:00
renovate[bot]
ebda61ad42 Update dependency lint-staged to v15.2.7 2024-06-13 09:50:40 +02:00
renovate[bot]
7d6c91b87b Update dependency lint-staged to v15.2.6 2024-06-12 16:09:42 +02:00
renovate[bot]
90d571b03a Update dependency lint-staged to v15.2.5 2024-05-27 16:58:49 +02:00
renovate[bot]
3ebe206ea7 Update TryGhost packages 2024-05-27 16:58:32 +02:00
renovate[bot]
c2b250fe53 Update dependency lint-staged to v15.2.4 2024-05-27 15:11:33 +02:00
renovate[bot]
534c8879f9 Update dependency rimraf to v5.0.7 2024-05-13 12:16:45 +02:00
renovate[bot]
84c1e95d4e Update dependency rimraf to v5.0.6 2024-05-13 09:05:18 +02:00
Daniel Lockyer
ac660f237d Added jackspeak resolution to fix ESM + CJS compat issue
fixes https://github.com/TryGhost/Ghost/issues/20065
refs https://github.com/storybookjs/storybook/issues/22431#issuecomment-1630086092
refs https://github.com/isaacs/jackspeak/issues/5

- this adds a resolution for jackspeak, which is a dependency deep
  inside storybook
- somewhere deep in the dependency tree, we're requiring an ESM
  package from a CJS package, which is causing issues
- this should hopefully avoid that by pinning jackspeak to a working version
2024-05-09 11:54:44 +02:00
renovate[bot]
83e50c9883 Update dependency lint-staged to v15 2024-05-09 10:23:04 +02:00
renovate[bot]
a33dccf8cd Update TryGhost packages 2024-05-01 17:01:41 +02:00
renovate[bot]
e7bb7a47ed Update dependency typescript to v5.4.5 2024-04-16 09:08:58 +02:00
renovate[bot]
0c119e2464 Update dependency typescript to v5.4.4 2024-04-15 09:47:55 +02:00
Simon Backx
89a01c2d05
Added support for clearing all data with data generator (#19901)
no issue

When testing Stripe migrations, it is useful to be able to clear the
database quickly without deleting admins and tokens. This is possible
with the data generator.
2024-03-25 14:44:28 +01:00
Steve Larson
a1c4e64994
Added queueing middleware to handle high request volume (#19887)
ref https://linear.app/tryghost/issue/CFR-4/
- added request queueing middleware (express-queue) to handle high
request volume
- added new config option `optimization.requestQueue`
- added new config option `optimization.requestConcurrency`
- added logging of request queue depth - `req.queueDepth`

We've done a fair amount of investigation around improving Ghost's
resiliency to high request volume. While we believe this to be partly
due to database connection contention, it also seems Ghost gets
overwhelmed by the requests themselves. Implementing a simple queueing
system allows us a simple lever to change the volume of requests Ghost
is actually ingesting at any given time and gives us options besides
simply increasing database connection pool size.

---------

Co-authored-by: Michael Barrett <mike@ghost.org>
2024-03-21 09:25:07 -05:00
renovate[bot]
092f982fec Update dependency typescript to v5.4.3 2024-03-21 09:28:10 +01:00
Daniel Lockyer
162f438c63 Updated @tryghost/errors dependency
- this version is written in TS, but was published a few months ago and
  needs to be bumped here
- also updates a previous deep include into the library, which was
  unnecessary anyway
2024-03-11 17:33:51 +01:00
renovate[bot]
0162fea441 Update dependency typescript to v5.4.2 2024-03-11 17:16:17 +01:00
Daniel Lockyer
f76bb91122 Updated @elastic/elasticsearch to latest version
refs https://github.com/TryGhost/Toolbox/issues/501

- at this point, we have no real reason to keep this behind as it wasn't
  proven what the cause of the high CPU was, and it's just causing more
  lockfile issues with the resolution
2024-01-30 21:41:33 +01:00
Simon Backx
ea7290c0da
Added xxl options to data generation (#19488)
no issue

Allows switching between 100k members vs 2M members
2024-01-16 10:20:33 +00:00
Simon Backx
285a684ef6
Updated data generator to support >2M members (#19484)
no issue

The data generator went out of memory when trying to generate fake data
for > 2M members. This adds some improvements to make sure it doesn't go
out of memory.

---------

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
2024-01-15 15:23:49 +00:00
renovate[bot]
87a477a803 Update dependency inquirer to v8.2.6 2024-01-05 15:29:58 +01:00
Simon Backx
d2cb23c3fa
Wired up Docker setup script and increased data generation performance (#19420)
ref PROD-233

- Stored whether Docker is used in the config files
- When running `yarn setup`, any existing Docker container will be
reset. Run with `-y` to skip the confirmation step.
- `yarn setup` will always init the database and generate fake data
- Increased amount of default generated data to 100,000 members + 500
posts.
- Made lots of performance improvements in the data generator so we can
generate the default data in ±170s
2024-01-05 13:42:30 +00:00
Daniel Lockyer
bba95ce034 Enabled persistent filesystem caching for Ember builds
fixes https://github.com/TryGhost/DevOps/issues/123

- ember-auto-import supports webpack v5 and v5 supports persistent file
  caching
- this stores a cache of built files across warm boots, so Admin built
  via `yarn dev` should be faster next time
- also ensures that recursive `node_modules` folders are emptied upon
  `yarn fix`, as the webpack cache is stored in `node_modules` under
  `ghost/admin`
- locally, this speeds up a warm build by 2x (!)
2023-12-13 16:40:18 +01:00
Simon Backx
60fb2e3139
Added quantities and seed option to the data generator (#19330)
ref PROD-243
2023-12-12 12:50:55 +01:00
renovate[bot]
996ca6ac87 Update dependency ts-node to v10.9.2 2023-12-09 10:51:51 +01:00
Daniel Lockyer
398f96249c Added MySQL setup via Docker
refs https://github.com/TryGhost/DevOps/issues/118

- we should standardize how we run MySQL, so there aren't massive gaps
  in developer experience
- Docker is great for this, and it's pretty easy to set up
- this adds a docker-compose.yml file with a small MySQL setup
- also configures `yarn setup` to spin up the Docker container and add
  it to config.local.json
- in the near future, we'll provide a base SQL file in .github/scripts/mysql-preload
  to ensure the DB is in a known state
2023-12-07 10:57:47 +01:00
renovate[bot]
1c04bdbdb2 Update dependency typescript to v5.3.3 2023-12-06 21:29:30 +01:00
Jono M
a8083960d8
Added test examples to AdminX demo (#19116)
refs https://github.com/TryGhost/Product/issues/4182

Updated framework to include shared test config for easier app setup.
2023-11-23 12:59:48 +00:00
renovate[bot]
17dec5a749 Update dependency typescript to v5.3.2 2023-11-20 20:11:26 +01:00