You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deployment/docker-compose.md
+20-11Lines changed: 20 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -19,12 +19,12 @@ Otherwise, use [this affiliate link](https://m.do.co/c/5d8aabe3ab80) to get $100
19
19
Then, click on the "Marketplace" tab under the "Choose an image" section and search for the app named "Docker".
20
20
This will provision an Ubuntu server with the latest versions of Docker and Docker Compose already installed!
21
21
22
-
For test purposes, cheapest plans will be enough, even though you might want at least 2GB of RAM to execute Docker Compose for the first time. For real production usage, you'll probably want to pick a plan in the "general purpose" section that will fit your needs.
22
+
For test purposes, the cheapest plans will be enough, even though you might want at least 2GB of RAM to execute Docker Compose for the first time. For real production usage, you'll probably want to pick a plan in the "general purpose" section to fit your needs.
23
23
24
24

25
25
26
26
You can keep the defaults for other settings, or tweak them according to your needs.
27
-
Don't forget to add your SSH key or to create a password then press the "Finalize and create" button.
27
+
Don't forget to add your SSH key or create a password then press the "Finalize and create" button.
28
28
29
29
Then, wait a few seconds while your Droplet is provisioning.
30
30
When your Droplet is ready, use SSH to connect:
@@ -35,23 +35,26 @@ ssh root@<droplet-ip>
35
35
36
36
## Configuring a Domain Name
37
37
38
-
In most cases, you'll want to associate a domain name to your website.
38
+
In most cases, you'll want to associate a domain name with your site.
39
39
If you don't own a domain name yet, you'll have to buy one through a registrar.
40
40
41
-
Then create a DNS record of type `A` for your domain name pointing to the IP address of your server.
42
-
43
-
Example:
41
+
Then create a DNS record of type `A` for your domain name pointing to the IP address of your server:
44
42
45
43
```dns
46
44
your-domain-name.example.com. IN A 207.154.233.113
47
-
````
45
+
```
46
+
47
+
Example with the DigitalOcean Domains service ("Networking" > "Domains"):
48
48
49
-
Note: Let's Encrypt, the service used by default by API Platform to automatically generate a TLS certificate, doesn't support using bare IP addresses.
50
-
Using a domain name is mandatory to use Let's Encrypt.
49
+

50
+
51
+
> [!NOTE]
52
+
> Let's Encrypt, the service used by default by API Platform to automatically generate a TLS certificate, doesn't support using bare IP addresses.
53
+
> Using a domain name is mandatory to use Let's Encrypt.
51
54
52
55
## Deploying
53
56
54
-
Copy your project on the server using `git clone`, `scp` or any other tool that may fit your needs.
57
+
Copy your project on the server using `git clone`, `scp`, or any other tool that may fit your needs.
55
58
If you use GitHub, you may want to use [a deploy key](https://docs.github.com/en/developers/overview/managing-deploy-keys#deploy-keys).
56
59
Deploy keys are also [supported by GitLab](https://docs.gitlab.com/ee/user/project/deploy_keys/).
docker compose -f compose.yaml -f compose.prod.yaml up --wait
72
75
```
73
76
74
-
Be sure to replace `your-domain-name.example.com` by your actual domain name and to set the values of `APP_SECRET`, `CADDY_MERCURE_JWT_SECRET` to cryptographically secure random values.
77
+
Be sure to replace `your-domain-name.example.com` with your actual domain name and to set the values of `APP_SECRET`, `CADDY_MERCURE_JWT_SECRET` to cryptographically secure random values.
78
+
79
+
> [!CAUTION]
80
+
> Docker can have a cache layer, make sure you have the right build for each deployment or rebuild your project with --no-cache option to avoid cache issue.
75
81
76
82
Your server is up and running, and a Let's Encrypt HTTPS certificate has been automatically generated for you.
77
83
Go to `https://your-domain-name.example.com` and enjoy!
78
84
85
+
> [!NOTE]
86
+
> The worker mode of FrankenPHP is enabled by default in prod. To disable it, add the env var FRANKENPHP_CONFIG as empty to the compose.prod.yaml file.
87
+
79
88
## Disabling HTTPS
80
89
81
90
Alternatively, if you don't want to expose an HTTPS server but only an HTTP one, run the following command:
0 commit comments