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

fix(docker): correct docker composes for prod and preprod #768

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

antoinezanardi
Copy link
Owner

@antoinezanardi antoinezanardi commented Aug 20, 2024

Summary by CodeRabbit

  • Documentation

    • Enhanced clarity regarding Docker tags for the Nuxt pre-rendering feature in the README.
    • Updated tag descriptions specify version number usage for production and clarify testing tags.
  • New Features

    • Introduced environment variables for the web service in preproduction configuration for improved API access and locale settings.
    • Updated port mappings to avoid conflicts and align with deployment specifications.
  • Production Updates

    • Adjusted Docker configurations for production settings, enhancing deployment standards and service configurations.

@antoinezanardi antoinezanardi added the 🐛 bug Something isn't working label Aug 20, 2024
@antoinezanardi antoinezanardi self-assigned this Aug 20, 2024
Copy link

coderabbitai bot commented Aug 20, 2024

Walkthrough

The recent updates enhance the configuration of the "werewolves-assistant" application, specifically for preproduction and production environments. Key improvements include the introduction of environment variables for the Nuxt pre-rendering feature, refined Docker image tags, and adjustments to port mappings. These changes aim to provide clearer documentation and facilitate smoother deployment processes across different environments, improving overall functionality and flexibility.

Changes

Files Change Summary
README.md Clarified Docker tags, specified "Nuxt pre-rendering feature," refined production tag descriptions, updated testing tags, and adjusted notes on non-prefixed tags.
docker/.../docker-compose.yml (preproduction, production) Added environment variables for web service, changed port mappings, updated image tags for production with correct locales, and reconfigured the API's listening port to align with deployment standards.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Web Service
    participant API Service
    
    User->>Web Service: Request data
    Web Service->>API Service: Fetch data from API
    API Service-->>Web Service: Return data
    Web Service-->>User: Send response
Loading

🐇 In the garden, changes bloom,
New settings chase away the gloom.
Ports align, configurations right,
With Docker tags, we take flight!
A pre-render here, a prod there,
Hop along, we're light as air! 🥕


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
README.md (1)

446-447: Consider rephrasing for stylistic variety.

LanguageTool suggests varying the phrasing to avoid repetition. Consider rephrasing for enhanced readability.

- If you want to test the app with the latest features, you can use the `preprod` tags.
- If you want to test the app with the latest release, you can use the `prod` tags.
+ To test the app with the latest features, use the `preprod` tags.
+ To test the app with the latest release, use the `prod` tags.
Tools
LanguageTool

[style] ~446-~446: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...with the API running locally. - If you want to test the app with the latest features, ...

(REP_WANT_TO_VB)


[style] ~447-~447: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...ou can use the preprod tags. - If you want to test the app with the latest release, y...

(REP_WANT_TO_VB)

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 334cc80 and abab921.

Files selected for processing (3)
  • README.md (2 hunks)
  • docker/werewolves-assistant-preproduction-example/docker-compose.yml (2 hunks)
  • docker/werewolves-assistant-production-example/docker-compose.yml (1 hunks)
Additional context used
LanguageTool
README.md

[style] ~446-~446: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...with the API running locally. - If you want to test the app with the latest features, ...

(REP_WANT_TO_VB)


[style] ~447-~447: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...ou can use the preprod tags. - If you want to test the app with the latest release, y...

(REP_WANT_TO_VB)

Additional comments not posted (7)
docker/werewolves-assistant-production-example/docker-compose.yml (3)

29-29: Port mapping update approved.

The port mapping for the API service has been updated to 9191:9191, aligning with the new port configuration.


6-9: Ensure environment variables are correctly configured.

The NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL and NUXT_PUBLIC_DEFAULT_LOCALE environment variables have been added. Verify that these values are appropriate for the production environment.


15-22: Verify port change consistency.

The API service port has been changed to 9191. Ensure this change is consistently applied across all relevant configurations and documentation.

docker/werewolves-assistant-preproduction-example/docker-compose.yml (3)

11-11: Port mapping update approved.

The port mapping for the front service has been updated to 3001:3000, aligning with preproduction requirements.


41-41: Port mapping update approved.

The port mapping for the MongoDB service has been updated to 29001:27017, aligning with preproduction requirements.


7-9: Verify preproduction environment variables.

The NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL and NUXT_PUBLIC_DEFAULT_LOCALE have been added. Ensure these values are suitable for the preproduction environment.

README.md (1)

Line range hint 424-449: Clarify Docker tag usage and environment variable injection.

The documentation updates provide clearer guidance on Docker tags and environment variable injection for the Nuxt pre-rendering feature. Ensure these changes accurately reflect the Docker configuration and provide clear instructions for users.

Verification successful

Documentation Consistency Verified for Docker Tags

The documentation for Docker tags and commands in the README.md is consistent with the definitions found in the package.json file. The commands are accurately described and align with their intended usage in the codebase. No discrepancies were found.

  • docker:preproduction-example:start and docker:production-example:start are correctly documented.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accuracy of Docker tag documentation.

# Test: Search for Docker tag references in the codebase. Expect: Consistency with documentation.
rg --type markdown 'docker:preproduction-example:start|docker:production-example:start'

Length of output: 194


Script:

#!/bin/bash
# Description: Check for the definitions of Docker commands in project scripts or configuration files.

# Test: Search for Docker command definitions in the codebase.
rg 'docker:preproduction-example:start|docker:production-example:start' -g '*.json' -g '*.yml' -g '*.yaml' -g '*.sh' -g '*.js'

Length of output: 707

Tools
LanguageTool

[style] ~446-~446: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...with the API running locally. - If you want to test the app with the latest features, ...

(REP_WANT_TO_VB)


[style] ~447-~447: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...ou can use the preprod tags. - If you want to test the app with the latest release, y...

(REP_WANT_TO_VB)

Copy link

sonarcloud bot commented Aug 20, 2024

@antoinezanardi antoinezanardi merged commit 89175cd into develop Aug 20, 2024
15 checks passed
@antoinezanardi antoinezanardi deleted the fix/docker-compose-prod-preprod branch August 20, 2024 08:54
antoinezanardi pushed a commit that referenced this pull request Aug 20, 2024
## [1.29.0](v1.28.0...v1.29.0) (2024-08-20)

### 🚀 Features

* **actor:** actor playground and events ([#747](#747)) ([6c9a034](6c9a034))
* **game-lobby:** thief and actor cards confirm steps ([#760](#760)) ([11a9bd5](11a9bd5))

### 🐛 Bug Fixes

* **buttons:** correct icon slots ([#759](#759)) ([3bfbab9](3bfbab9))
* **docker:** correct docker composes for prod and preprod ([#768](#768)) ([89175cd](89175cd))

### 📖 Docs

* **docker:** explain dockers tags created ([#767](#767)) ([334cc80](334cc80))

### 🔁 CI

* **docker:** push multiple prebuilt images ([32838b1](32838b1))

### 🧹 Chore

* **deps:** update dependency @eslint/config-inspector to ^0.5.3 ([#750](#750)) ([d99ea7c](d99ea7c))
* **deps:** update dependency @eslint/config-inspector to ^0.5.4 ([#761](#761)) ([0196025](0196025))
* **deps:** update dependency @nuxtjs/i18n to ^8.4.0 ([#753](#753)) ([84a86f8](84a86f8))
* **deps:** update dependency @stylistic/eslint-plugin to ^2.6.4 ([#751](#751)) ([8899923](8899923))
* **deps:** update dependency @vueuse/core to ^11.0.1 ([#762](#762)) ([be4784d](be4784d))
* **deps:** update dependency @vueuse/core to v11 ([#754](#754)) ([b1c25df](b1c25df))
* **deps:** update dependency @vueuse/nuxt to ^11.0.1 ([#763](#763)) ([c66613f](c66613f))
* **deps:** update dependency @vueuse/nuxt to v11 ([#755](#755)) ([b3abc86](b3abc86))
* **deps:** update dependency pinia to ^2.2.2 ([#752](#752)) ([96d7032](96d7032))
* **deps:** update dependency semantic-release to ^24.1.0 ([#758](#758)) ([b109f4f](b109f4f))
* **deps:** update dependency type-fest to ^4.25.0 ([#757](#757)) ([c64b715](c64b715))
* **deps:** update dependency vue to ^3.4.38 ([#749](#749)) ([9ceb602](9ceb602))
* **deps:** update playwright monorepo to ^1.46.1 ([#756](#756)) ([df3bf86](df3bf86))
* **deps:** update pnpm to v9.7.1 ([#746](#746)) ([6803a0d](6803a0d))
* **deps:** update typescript-eslint monorepo to ^8.2.0 ([#766](#766)) ([211953e](211953e))
@antoinezanardi
Copy link
Owner Author

🎉 This PR is included in version 1.29.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant