Last active
March 22, 2020 02:43
-
-
Save TrinhTrungDung/378c9a5fdd6dae6365f1fb58213dd5e2 to your computer and use it in GitHub Desktop.
Create new container which has PostgreSQL database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
db: | |
image: postgres | |
container_name: test.db | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_DB: testdb | |
POSTGRES_USER: testuser | |
POSTGRES_PASSWORD: 123456 | |
volumes: | |
- db-data:/var/lib/postgresql/testdata | |
volumes: | |
db-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment