Course / دورة
Taking it live, and keeping it thereإطلاقه إلى الناس، وإبقاؤه قائمًا
The half of the job that starts after the code works
نصف العمل الذي يبدأ بعد أن يعمل الكود
intermediate 16 lessons 5 chapters 14 hours
Before you start / قبل أن تبدأ: PHP: code that runs on a server , Git and GitHub , The operating system and the Terminal
0 / 16 lessons completed / دروس مكتملة
What you will be able to do / ماذا ستستطيع أن تفعل
- Put an application on a server and update it without breaking it تضع تطبيقًا على خادم وتحدّثه دون أن تكسره
- Find out something is wrong before your users tell you تعلم أن شيئًا ما خطأ قبل أن يخبرك مستخدموك
- Keep secrets, backups and updates in an order you can trust تحفظ الأسرار والنسخ الاحتياطية والتحديثات في نظام تثق به
- Handle an incident without making it worse تتعامل مع حادث دون أن تزيده سوءًا
1 Where it runsأين يعمل 3
-
1
The machine that matters is not yours / الجهاز المهم ليس جهازك
Everything you have built so far ran on a computer you control, alone, with nobody watching. Production is a different place with different rules, and most of the surprises come from assuming the two are the same.
كل ما بنيته حتى الآن عمل على حاسوب تتحكم فيه، وحدك، ولا أحد يشاهد. والإنتاج مكان آخر بقواعد أخرى، ومعظم المفاجآت تأتي من افتراض أن الاثنين سواء.
-
2
The things that differ, and the things nobody may see / ما يختلف، وما لا يجوز أن يراه أحد
Two kinds of value cannot live in your code: what changes between environments, and what must never be published. They are handled the same way, and the day you get it wrong is the day a password is in a public repository forever.
نوعان من القيم لا يمكن أن يعيشا في كودك: ما يتغير بين البيئات، وما لا يجوز نشره أبدًا. ويُعالجان بالطريقة نفسها، ويوم تخطئ فيهما هو يوم تصير كلمة سر في مستودع عام إلى الأبد.
-
3
What the web can reach, and who owns it / ما يستطيع الويب بلوغه، ومن يملكه
Two questions decide most of a server's security, and both have short answers: which directory does a URL map onto, and which user is the code running as. Getting them right is structural — it protects you from mistakes you have not made yet.
سؤالان يقرران معظم أمن الخادم، ولكليهما جواب قصير: أيُّ مجلد يقابله الرابط، وأيُّ مستخدم يعمل الكود بصفته. وضبطهما بنيوي — فهو يحميك من أخطاء لم ترتكبها بعد.
2 Getting it thereإيصاله إلى هناك 3
-
4
A deploy is a script, not an afternoon / النشر برنامج، لا أصيل يوم
If putting new code live is a sequence of remembered steps, it will be done differently each time and wrongly under pressure. Writing it down as a command that anyone can run is the whole discipline, and it is worth doing on day one.
إن كان وضع كود جديد حيًّا سلسلة خطوات محفوظة، فسيُنفَّذ مختلفًا في كل مرة وخطأً تحت الضغط. وكتابته أمرًا يستطيع أي أحد تشغيله هي الانضباط كله، ويستحق الفعل في اليوم الأول.
-
5
Changing the shape of live data / تغيير شكل بيانات حيّة
Code can be replaced wholesale. A database cannot — it holds things you cannot recreate, and it has to change while people are using it. Migrations are how, and the ordering rules are what stop a deploy taking the site down.
الكود يمكن استبداله جملةً. أما قاعدة البيانات فلا — فهي تحمل أشياء لا تستطيع إعادة إنشائها، ولا بد أن تتغير والناس يستخدمونها. والترحيلات هي الكيفية، وقواعد الترتيب هي ما يمنع نشرًا من إسقاط الموقع.
-
6
Getting back to working / العودة إلى ما كان يعمل
The question during an outage is never "what did I do wrong". It is "how do I get the site working again in the next two minutes" — and the answer has to be decided while nothing is on fire, because it is not a decision you can make well at the time.
السؤال أثناء الانقطاع ليس «ما الخطأ الذي فعلته» أبدًا. بل «كيف أعيد الموقع إلى العمل في الدقيقتين القادمتين» — والجواب لا بد أن يُقرَّر ولا شيء يحترق، لأنه ليس قرارًا تحسن اتخاذه وقتها.
3 Keeping it upإبقاؤه قائمًا 4
-
7
Logs you can actually answer questions with / سجلات تستطيع الإجابة بها فعلًا
The PHP course covered what to log. This is about the log as an object on a server: where it lives, why it eventually fills the disk and stops the site, and what makes the difference between a file you grep and a file you give up on.
غطّت دورة PHP ما يُسجَّل. وهذا عن السجل بوصفه شيئًا على خادم: أين يعيش، ولماذا يملأ القرص في النهاية فيوقف الموقع، وما الفرق بين ملف تبحث فيه وملف تستسلم أمامه.
-
8
Finding out before your users do / أن تعلم قبل مستخدميك
Without monitoring, the way you learn that your site is down is that somebody tells you — which means it was down for as long as it took them to notice, care, and find out how to reach you. Two checks close most of that gap.
بلا مراقبة، تكون طريقة علمك بأن موقعك ساقط أن يخبرك أحدهم — ويعني ذلك أنه كان ساقطًا طوال ما استغرقوه ليلحظوا ويهتموا ويعرفوا كيف يبلغونك. وفحصان يسدّان معظم تلك الفجوة.
-
9
The restore you have never tried / الاستعادة التي لم تجربها قط
Everyone has backups. Far fewer have ever restored one, and those are different things — the day you find out which kind you have is always the day you most needed the other.
للجميع نسخ احتياطية. وأقل بكثير من جرّب استعادة واحدة، وهما شيئان مختلفان — ويوم تعرف أيَّ نوع لديك هو دائمًا اليوم الذي احتجت فيه الآخر أشد الحاجة.
-
10
What is actually slow / ما البطيء فعلًا
Performance work goes wrong when it is done by intuition. Almost every slow page is slow for one of four reasons, and none of them is the thing people rewrite first — so the whole skill is measuring before touching anything.
يسوء عمل الأداء حين يُؤدى بالحدس. فكل صفحة بطيئة تقريبًا بطيئةٌ لأحد أربعة أسباب، وليس منها ما يعيد الناس كتابته أولًا — فالمهارة كلها القياس قبل مسّ أي شيء.
4 Keeping it safeإبقاؤه آمنًا 4
-
11
Six headers and a certificate / ست ترويسات وشهادة
A short block of headers, written once, closes several whole classes of attack. It is the best return on effort available anywhere in this course — and almost every small site ships without it because nothing visibly breaks when it is missing.
كتلة قصيرة من الترويسات، تُكتب مرة، تغلق أصنافًا كاملة من الهجمات. وهي أفضل عائد على جهد متاح في هذه الدورة كلها — ومع ذلك يُشحن كل موقع صغير تقريبًا بدونها لأن شيئًا لا ينكسر ظاهريًا حين تغيب.
-
12
The most dangerous feature you will ship / أخطر ميزة ستشحنها
A file upload lets a stranger put a file of their choosing on your server. Everything about handling it follows from taking that sentence literally, and the mistakes are all versions of not having done so.
رفع الملفات يتيح لغريب وضع ملف من اختياره على خادمك. وكل ما يتعلق بمعالجته يتبع أخذ تلك الجملة حرفيًا، والأخطاء كلها صور لعدم فعل ذلك.
-
13
When the traffic is not people / حين لا تكون الحركة أناسًا
Every public form is eventually found by something automated. Limits are how a site stays usable for the people it was built for, and the design question is always the same: what does this cost me, and what does it cost the person who is not abusing it?
كل نموذج عام يجده شيء آلي في النهاية. والحدود هي كيف يبقى الموقع صالحًا لمن بُني لهم، وسؤال التصميم هو هو دائمًا: ما تكلفة هذا عليّ، وما تكلفته على من لا يسيء استخدامه؟
-
14
Other people's code, running as you / كود غيرك، يعمل بصفتك
Every library you install runs with your application's full permissions, and every one you do not update accumulates published vulnerabilities. Both facts point the same way: take fewer dependencies, and update the ones you take.
كل مكتبة تثبّتها تعمل بصلاحيات تطبيقك كاملة، وكل واحدة لا تحدّثها تراكم ثغرات منشورة. والحقيقتان تشيران إلى الجهة نفسها: خذ اعتماديات أقل، وحدّث ما تأخذه.
5 When it goes wrongحين يسوء الأمر 2
-
15
The first hour / الساعة الأولى
Something is badly wrong and people are affected. What you do in the first hour decides how long it lasts and how much is left to learn from — and almost none of it is technical.
ثمة خطب جسيم والناس متأثرون. وما تفعله في الساعة الأولى يقرر كم يدوم وكم يبقى للتعلّم منه — ولا شيء منه تقني تقريبًا.
-
16
Writing down what only you know / كتابة ما لا يعرفه سواك
Every running system has facts that exist in one person's head — where it lives, how to deploy it, what breaks at month end. Writing them down is the last piece of taking something live, and the piece that decides whether it survives you.
كل نظام عامل فيه حقائق تعيش في رأس شخص واحد — أين يعيش، وكيف يُنشر، وما ينكسر آخر الشهر. وكتابتها آخر قطعة في إطلاق شيء، والقطعة التي تقرر أينجو بعدك.