Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update embed documentation #609

Merged
merged 5 commits into from
Mar 6, 2024

Conversation

bofalke
Copy link
Contributor

@bofalke bofalke commented Feb 28, 2024

Ref #608

docs/fr/embed.md Outdated Show resolved Hide resolved
docs/fr/embed.md Outdated Show resolved Hide resolved
docs/embed.md Outdated Show resolved Hide resolved
@bofalke
Copy link
Contributor Author

bofalke commented Feb 29, 2024

I checked back, you cannot explicitly copy stuff if it is mentioned in the .dockerignore. Docker will simply say that the file does not exist.

I will check for a different solution and adjust the documentation once i found something.

@bofalke bofalke changed the title Update embed documentation Draft: Update embed documentation Feb 29, 2024
@dunglas
Copy link
Owner

dunglas commented Feb 29, 2024

Alternatively, we could just add a warning in the docs asking the user to beware the .dockerignore file.
Using the git archive trick, it's easy for the end user to just remove .dockerignore from the generated directory.

The user could even add .dockerignore and other Docker related files in a .gitattributes file with the export-ignore attribute. This will prevent copying useless files into the standalone binary.

@bofalke
Copy link
Contributor Author

bofalke commented Feb 29, 2024

Also the composer dump-env prod command does not work without the composer install.

I mean we could do some little renaming and copy the .env files and vendor folder explicitly into the docker container but i think it is easier to maybe just mention, that the COPY . . command will ignore anything in the .dockerignore and one should adjust it to not ignore the files that we want?

Alternatively, we could move the

# Set proper environment variables
echo APP_ENV=prod > .env.local
echo APP_DEBUG=0 >> .env.local

# Remove the tests
rm -Rf tests/

# Install the dependencies
composer install --ignore-platform-reqs --no-dev -a

# Optimize .env
composer dump-env prod

part inside the static-build.Dockerfile.

Any opinions?

@bofalke bofalke force-pushed the fix/update-embed-documentation branch from a27eacb to c178b1e Compare February 29, 2024 16:08
@bofalke bofalke changed the title Draft: Update embed documentation Update embed documentation Feb 29, 2024
@bofalke
Copy link
Contributor Author

bofalke commented Feb 29, 2024

I generated the translations so maybe some native speaker should check them again ^^

docs/cn/embed.md Outdated Show resolved Hide resolved
docs/cn/embed.md Outdated Show resolved Hide resolved
docs/cn/embed.md Outdated Show resolved Hide resolved
Copy link
Owner

@dunglas dunglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer this solution (when @crazywhalecc fix will be merged).

docs/fr/embed.md Outdated Show resolved Hide resolved
docs/embed.md Outdated Show resolved Hide resolved
Co-authored-by: Jerry Ma <jesse2061@outlook.com>
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
@dunglas dunglas merged commit 7a81855 into dunglas:main Mar 6, 2024
27 checks passed
@dunglas
Copy link
Owner

dunglas commented Mar 6, 2024

Thanks @bofalke!

@bofalke bofalke deleted the fix/update-embed-documentation branch March 13, 2024 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants