Skip to content

Commit 3563a35

Browse files
committed
fixes
1 parent b32081c commit 3563a35

File tree

3 files changed

+14
-23
lines changed

3 files changed

+14
-23
lines changed

deployment/docker-compose.md

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ While [Docker Compose](https://docs.docker.com/compose/) is mainly known and use
44
or small-scale deployments, where the robustness (and the associated complexity) of [Kubernetes](kubernetes.md) is not
55
required.
66

7-
API Platform provides Docker images, and a Docker Compose definition optimized for production usage.
7+
API Platform provides Docker images and a Docker Compose definition optimized for production usage.
88
In this tutorial, we will learn how to deploy our Symfony application on a single server using Docker Compose.
99

10-
Note: this tutorial has been adapted from [the Symfony Docker documentation](https://github.com/dunglas/symfony-docker/blob/main/docs/production.md).
10+
Note: this tutorial has been adapted from [the Symfony Docker documentation](https://github.com/dunglas/symfony-docker/blob/main/docs/production.md).
1111

1212
## Preparing a Server
1313

1414
To deploy your application in production, you need a server.
15-
In this tutorial we will use a virtual machine provided by DigitalOcean, but any Linux server can work.
15+
In this tutorial, we will use a virtual machine provided by DigitalOcean, but any Linux server can work.
1616
If you already have a Linux server with Docker Compose installed, you can skip straight to [the next section](#configuring-a-domain-name).
1717

1818
Otherwise, use [this affiliate link](https://m.do.co/c/5d8aabe3ab80) to get $100 of free credit, create an account, then click on "Create a Droplet".
1919
Then, click on the "Marketplace" tab under the "Choose an image" section and search for the app named "Docker".
2020
This will provision an Ubuntu server with the latest versions of Docker and Docker Compose already installed!
2121

22-
To test, the cheapest plan will be enough, but 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 plan will be enough. For real production usage, you'll probably want to pick a plan in the "general purpose" section that will fit your needs.
2323

2424
![Deploying a Symfony app on DigitalOcean with Docker Compose](digitalocean-droplet.png)
2525

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.
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.
2828

2929
Then, wait a few seconds while your Droplet is provisioning.
3030
When your Droplet is ready, use SSH to connect:
@@ -35,7 +35,7 @@ ssh root@<droplet-ip>
3535

3636
## Configuring a Domain Name
3737

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 website.
3939
If you don't own a domain name yet, you'll have to buy one through a registrar.
4040
Use [this affiliate link](https://gandi.link/f/93650337) to redeem a 20% discount at Gandi.net.
4141

@@ -51,14 +51,14 @@ Example in Gandi's UI:
5151
5252
![Creating a DNS record at Gandi.net](gandi-dns.png)
5353
54-
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.
54+
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.
5555
Using a domain name is mandatory to use Let's Encrypt.
5656
5757
## Deploying
5858
59-
Copy your project on the server using `git clone`, `scp` or any other tool that may fit your need.
59+
Copy your project on the server using `git clone`, `scp` or any other tool that may fit your needs.
6060
If you use GitHub, you may want to use [a deploy key](https://docs.github.com/en/developers/overview/managing-deploy-keys#deploy-keys).
61-
Deploy keys are also [supported by GitLab](https://docs.gitlab.com/ee/user/project/deploy_keys/).
61+
Deploy keys are also [supported by GitLab](https://docs.gitlab.com/ee/user/project/deploy_keys/).
6262
6363
Example with Git:
6464
@@ -71,27 +71,18 @@ Go into the directory containing your project (`<project-name>`), and start the
7171
```console
7272
SERVER_NAME=your-domain-name.example.com \
7373
APP_SECRET=ChangeMe \
74+
POSTGRES_PASSWORD=ChangeMe \
7475
CADDY_MERCURE_JWT_SECRET=ChangeMe \
7576
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
7677
```
7778

78-
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.
79+
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.
7980

8081
Your server is up and running, and a Let's Encrypt HTTPS certificate has been automatically generated for you.
8182
Go to `https://your-domain-name.example.com` and enjoy!
8283

83-
## Disabling HTTPS
84-
85-
Alternatively, if you don't want to expose an HTTPS server but only an HTTP one, run the following command:
86-
87-
```console
88-
SERVER_NAME=:80 \
89-
APP_SECRET=ChangeMe \
90-
CADDY_MERCURE_JWT_SECRET=ChangeMe \
91-
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
92-
```
93-
9484
## Deploying on Multiple Nodes
9585

96-
If you want to deploy your app on a cluster of machines, you can use [Docker Swarm](https://docs.docker.com/engine/swarm/stack-deploy/),
86+
If you want to deploy your app on a cluster of machines, we recommend using [Kubernetes](kubernetes.md).
87+
You can use [Docker Swarm](https://docs.docker.com/engine/swarm/stack-deploy/),
9788
which is compatible with the provided Compose files.
File renamed without changes.

0 commit comments

Comments
 (0)