Use Docker install Postgres for Drupal
출처: https://ionemind.com/content/use-docker-install-postgres-drupal
# Pull docker postgres
docker pull postgres
# Run postgres instance
docker run --name drupal-postgres -d -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres
# Exec docker
docker exec -it drupal-postgres bash
# Create database and user;
# Login to postgres command line
psql -U postgres
# Create db and user
create database drupal;
create user drupal with encrypted password 'drupal';
grant all privileges on database drupal to drupal;
# list
\l
# delete database
DROP DATABASE drupal;
# Logout
exit;
# Import database from outside
docker exec -i drupal-postgres psql --username drupal --password drupal drupal < ./drupal-db-dump.sql
# Export database
docker exec -i drupal-postgres pg_dump -U postgres -d drupal > ./drupal.sql
'프로그램 활용 > 클라우드 가상화 도커' 카테고리의 다른 글
Ubuntu 22.04에서 Docker로 Drupal을 설치하는 방법 (0) | 2023.07.25 |
---|---|
How to Install Drupal with Docker on Ubuntu 22.04 (0) | 2023.07.25 |
docker로 drupal 배포 (0) | 2023.07.25 |
Docker 설치하고, Docker로 웹 어플리케이션 배포해보기 (0) | 2023.07.25 |
쿠버네티스 컨테이너 런타임 Docker에서 Containerd로 (0) | 2023.07.25 |