platform/docker/README.md

143 lines
2.6 KiB
Markdown
Raw Normal View History

2024-06-23 03:15:41 +00:00
# Docker setup
2022-07-11 06:15:02 +00:00
2024-06-23 03:15:41 +00:00
## PostreSQL
2022-07-11 06:15:02 +00:00
2024-06-23 03:15:41 +00:00
### Starting the PostreSQL container
2022-07-11 06:15:02 +00:00
```bash
2024-06-23 03:15:41 +00:00
docker compose -f docker-compose-pg.yml up -d
```
### Stopping the PostreSQL container
```bash
docker compose -f docker-compose-pg.yml stop
docker compose -f docker-compose-pg.yml down
```
### Checking the PostreSQL container log
```bash
docker logs docker-pg-1 -f
2022-07-11 06:15:02 +00:00
```
### Running psql
```bash
docker exec -it <container id> /bin/bash
psql --username postgres
```
### Create database, user and access
```psql
postgres=# create database orm_test;
postgres=# create user test with encrypted password 'test123';
postgres=# grant all privileges on database orm_test to test;
```
## MariaDB
2024-06-23 03:15:41 +00:00
### Starting the MariaDB container
```bash
docker compose -f docker-compose-mariadb.yml up -d
```
### Stopping the MariaDB container
```bash
docker compose -f docker-compose-mariadb.yml stop
docker compose -f docker-compose-mariadb.yml down
```
### Checking the MariaDB container log
```bash
docker logs docker-mariadb-1 -f
```
2022-07-11 06:15:02 +00:00
## MySQL
2024-06-23 03:15:41 +00:00
### Starting the MySQL container
```bash
docker compose -f docker-compose-mysql.yml up -d
```
### Stopping the MySQL container
```bash
docker compose -f docker-compose-mysql.yml stop
docker compose -f docker-compose-mysql.yml down
```
### Checking the MySQL container log
```bash
docker logs docker-mysql-1 -f
```
## MongoDB
### Starting the MongoDB container
```bash
docker compose -f docker-compose-mongo.yml up -d
```
### Stopping the MongoDB container
```bash
docker compose -f docker-compose-mongo.yml stop
docker compose -f docker-compose-mongo.yml down
```
### Checking the MongoDB container log
```bash
docker logs docker-mongo-1 -f
```
2024-06-29 09:57:48 +00:00
## rethinkDB
### Starting the rethinkDB container
```bash
docker compose -f docker-compose-rethinkdb.yml up -d
```
### Stopping the rethinkDB container
```bash
docker compose -f docker-compose-rethinkdb.yml stop
docker compose -f docker-compose-rethinkdb.yml down
```
### Checking the rethinkDB container log
```bash
docker logs docker-rethinkdb-1 -f
```
2022-07-11 06:15:02 +00:00
## Redis
2024-06-23 03:15:41 +00:00
### Starting the Redis container
```bash
docker compose -f docker-compose-redis.yml up -d
```
### Stopping the Redis container
```bash
docker compose -f docker-compose-redis.yml stop
docker compose -f docker-compose-redis.yml down
```
### Checking the Redis container log
```bash
docker logs docker-redis-1 -f
```