- Node 20
- Copy
.env.example
to.env
- Build and start the application's containers
cp .env.example .env
docker compose up // or docker compose strapiDB -d
- Visit http://localhost:1337/admin/
- Under Settings > Internationalization: Add
German (de)
& set it as default - Under Settings > API Tokens: Add new token and copy it to the
.env
of the A2J webapp
-
If you get an error like
ECONNREFUSED 172.**.*.*:5431
on Mac, this is a known issue. Just remove the port binding to 5431 for it to work. -
If you see this error, then you need to install Node 20.x not higher
(node:27666) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Strapi comes with a fully featured Command Line Interface (CLI)
# Start strapi instance
npm run start
# Build admin panel
npm run build
# Start strapi instance with autoreload & content builder enabled
npm run develop
Replaces all local data with a copy of remote instance
- Requires both strapi instances to be of the same version
- Deletes all local data!
- Create a
Push
transfer token in your local instance (Settings / Transfer Tokens) & save asTRANSFER_TOKEN_LOCAL
into your local.env
file - Create a
Pull
transfer token on the remote instance and save asTRANSFER_TOKEN_REMOTE
into your.env
file - Update the
TRANSFER_URL_REMOTE
(Note: this should point to the/admin
endpoint) - Run
npm run transfer
Be careful. Test with local dump first before committing.
- read the (short) docs!
- run once on Strapi server start-up (or reload when using
npm run develop
) - migration files are run in alphabetical order (use time stamps in front)
- no revert possible
- only(?) use for data migration, not for changing database structure (do this in the schemas instead)
- you might not want to run a migration in unit tests -> check for
process.env.NODE_ENV === "test"
and return early