https://github.com/gh640/docker-compose-depends_on-nginx-certs-sample
A sample that runs NGINX with a self-signed certificate
https://github.com/gh640/docker-compose-depends_on-nginx-certs-sample
docker docker-compose nginx self-signed-certificate
Last synced: about 1 month ago
JSON representation
A sample that runs NGINX with a self-signed certificate
- Host: GitHub
- URL: https://github.com/gh640/docker-compose-depends_on-nginx-certs-sample
- Owner: gh640
- Created: 2022-02-11T14:45:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-11T15:02:16.000Z (over 3 years ago)
- Last Synced: 2025-03-04T10:25:38.644Z (7 months ago)
- Topics: docker, docker-compose, nginx, self-signed-certificate
- Language: HTML
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A sample that runs NGINX with a self-signed certificate
This is a sample Docker Compose configuration to run an NGINX server with a self-signed certificate.
## Requirements
- Docker
- Docker Compose `>=1.29.0`## Usage
Build images and run containers.
```zsh
docker compose build
docker compose up -d
```You can check the NGINX server runs with a self-signed certificate.
```zsh
curl --insecure \
--resolve 'example.local:443:127.0.0.1' \
https://example.local
``````html
Hello
body {
margin: 0;
padding: 0;
font-family: sans-serif;
}
.bodywrapper {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background-color: #f4f8f8;
}
Hello.
```
Stop containers and remove resources after you've finished.
```zsh
docker compose down
```## References
- [Depends_on condition service_completed_successfully · Issue #8154 · docker/compose · GitHub](https://github.com/docker/compose/issues/8154)
- [Release 1.29.0 · docker/compose · GitHub](https://github.com/docker/compose/releases/tag/1.29.0)