docker-compose down
контейнер удаляется, БД не сохраняется. Никакой обратный процесс не нужен.docker run --rm -it alpine sh -c "apk update && apk add build-base imagemagick-dev imagemagick && convert"
Version: ImageMagick 7.1.0-50 beta Q16-HDRI x86_64 20489 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib cairo fontconfig freetype gslib heic jng jpeg jxl lcms ltdl lzma png ps rsvg tiff webp x xml zlib
Compiler: gcc (11.2)
Usage: convert [options ...] file [ [options ...] file ...] [options ...] file
Image Settings:
-adjoin join images into a single multi-image file
-affine matrix affine transform matrix
-alpha option activate, deactivate, reset, or set the alpha channel
-antialias remove pixel-aliasing
-authenticate password
decipher image with this password
-attenuate value lessen (or intensify) when adding noise to an image
-background color background color
-bias value add bias when convolving an image
-black-point-compensation
-p 9200:9200
curl: (77) error setting certificate verify locations:
using the http_ca.crt file that you copied from your Docker container
docker network create commonnet
docker run --rm --name nginx1 -d --network commonnet nginx
docker run --rm --name nginx2 -d --network commonnet nginx
docker exec -it nginx1 bash
apt update
apt install iputils-ping
ping nginx2
PING nginx2 (10.31.3.3) 56(84) bytes of data.
64 bytes from nginx2.testnet (10.31.3.3): icmp_seq=1 ttl=64 time=0.054 ms
64 bytes from nginx2.testnet (10.31.3.3): icmp_seq=2 ttl=64 time=0.043 ms
...
curl nginx2
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
composer:
image: composer
network_mode: bridge
volumes:
- ./:/var/www/html
working_dir: /var/www/html
entrypoint:
- composer
- install
depends_on:
- php
server {
listen 8080;
server_name my-server.ru ;
location /auth {
proxy_pass http://auth_service:8081;
....
location /api {
proxy_pass http://api_service:8082;
version: '3'
services:
nginx:
image: nginx
...
apiserver:
image: nodejs-server
...
adminpanel:
image: custom-image
...
db:
image: mysql-...
docker-compose up -d
docker-compose restart adminpanel
location / {
proxy_pass http://site:3000;
}
curl http://test.com
получить test.com alive
curl http://site.com
получить site.com alive