Skip to content

Commit

Permalink
Merge pull request #8083 from appwrite/fix-container-naming
Browse files Browse the repository at this point in the history
Improve container naming conventions
  • Loading branch information
christyjacob4 committed May 16, 2024
2 parents af68383 + 6dd9611 commit 33587a2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ Learn more at our [Technology Stack](#technology-stack) section.
- [Microservices vs Monolithic](https://www.mulesoft.com/resources/api/microservices-vs-monolithic#:~:text=Microservices%20architecture%20vs%20monolithic%20architecture&text=A%20monolithic%20application%20is%20built%20as%20a%20single%20unit.&text=To%20make%20any%20alterations%20to,formally%20with%20business%2Doriented%20APIs.)
- [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel) - Appwrite console architecture

##### Container Namespace Conventions
To keep our services easy to understand within Docker we follow a naming convention for all our containers depending on it's intended use.

`appwrite-worker-X` - Workers (`src/Appwrite/Platform/Workers/*`)
`appwrite-task-X` - Tasks (`src/Appwrite/Platform/Tasks/*`)

Other containes should be named the same as their service, for example `redis` should just be called `redis`.

##### Security

- [Appwrite Auth and ACL](https://github.com/appwrite/appwrite/blob/master/docs/specs/authentication.drawio.svg)
Expand Down Expand Up @@ -481,9 +489,9 @@ Things to remember when releasing SDKs:

## Debug

Appwrite uses [XDebug](https://github.com/xdebug/xdebug) debugger, which can be made available during build of Appwrite. You can connect to the debugger using VS Code's [PHP Debug](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug) extension.
Appwrite uses [XDebug](https://github.com/xdebug/xdebug) debugger, which can be made available during build of Appwrite. You can connect to the debugger using VS Code's [PHP Debug](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug) extension.

If you are in PHP Storm you don't need any plugin. Below are the settings required for remote debugger connection:
If you are in PHP Storm you don't need any plugin. Below are the settings required for remote debugger connection:

1. Set **DEBUG** build arg in **appwrite** service in **docker-compose.yml** file.
2. If needed edit the **dev/xdebug.ini** file to your needs.
Expand Down
12 changes: 6 additions & 6 deletions app/views/install/compose.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,11 @@ services:
- _APP_MIGRATIONS_FIREBASE_CLIENT_ID
- _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET

appwrite-maintenance:
appwrite-task-maintenance:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: maintenance
<<: *x-logging
container_name: appwrite-maintenance
container_name: appwrite-task-maintenance
restart: unless-stopped
networks:
- appwrite
Expand Down Expand Up @@ -665,10 +665,10 @@ services:
- _APP_LOGGING_CONFIG
- _APP_USAGE_AGGREGATION_INTERVAL

appwrite-scheduler-functions:
appwrite-task-scheduler-functions:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: schedule-functions
container_name: appwrite-scheduler-functions
container_name: appwrite-task-scheduler-functions
<<: *x-logging
restart: unless-stopped
networks:
Expand All @@ -690,10 +690,10 @@ services:
- _APP_DB_USER
- _APP_DB_PASS

appwrite-scheduler-messages:
appwrite-task-scheduler-messages:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: schedule-messages
container_name: appwrite-scheduler-messages
container_name: appwrite-task-scheduler-messages
<<: *x-logging
restart: unless-stopped
networks:
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -627,10 +627,10 @@ services:
- _APP_MIGRATIONS_FIREBASE_CLIENT_ID
- _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET

appwrite-maintenance:
appwrite-task-maintenance:
entrypoint: maintenance
<<: *x-logging
container_name: appwrite-maintenance
container_name: appwrite-task-maintenance
image: appwrite-dev
networks:
- appwrite
Expand Down Expand Up @@ -726,10 +726,10 @@ services:
- _APP_LOGGING_CONFIG
- _APP_USAGE_AGGREGATION_INTERVAL

appwrite-scheduler-functions:
appwrite-task-scheduler-functions:
entrypoint: schedule-functions
<<: *x-logging
container_name: appwrite-scheduler-functions
container_name: appwrite-task-scheduler-functions
image: appwrite-dev
networks:
- appwrite
Expand All @@ -753,10 +753,10 @@ services:
- _APP_DB_USER
- _APP_DB_PASS

appwrite-scheduler-messages:
appwrite-task-scheduler-messages:
entrypoint: schedule-messages
<<: *x-logging
container_name: appwrite-scheduler-messages
container_name: appwrite-task-scheduler-messages
image: appwrite-dev
networks:
- appwrite
Expand Down

0 comments on commit 33587a2

Please sign in to comment.