Skip to content

Commit

Permalink
content: update database docker-compose, create database and table
Browse files Browse the repository at this point in the history
  • Loading branch information
luizchaves committed Sep 9, 2024
1 parent 673116b commit 57eb0fc
Show file tree
Hide file tree
Showing 6 changed files with 295 additions and 64 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ pnpm-debug.log*

# jest coverage
coverage/

public/codes/database/*/data
2 changes: 2 additions & 0 deletions public/codes/database/mongo-server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ services:
- app-tier
ports:
- 27017:27017
volumes:
- ./data:/data/db

mongo-express:
container_name: mongo-express
Expand Down
6 changes: 6 additions & 0 deletions public/codes/database/mysql-server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ services:
- app-tier
ports:
- 3306:3306
volumes:
- mysql_data:/var/lib/mysql
# - ./data:/var/lib/mysql

adminer:
image: adminer:4.8.1
Expand All @@ -29,3 +32,6 @@ services:
networks:
app-tier:
driver: bridge

volumes:
mysql_data:
39 changes: 23 additions & 16 deletions public/codes/database/postgres-server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,42 @@ services:
image: postgres:16.2
restart: always
environment:
# POSTGRES_USER: postgres # default
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
networks:
- app-tier
ports:
- 5432:5432
volumes:
- postgres_data:/var/lib/postgresql/data
# - ./data:/var/lib/postgresql/data

# adminer:
# image: adminer:4.8.1
adminer:
image: adminer:4.8.1
restart: always
networks:
- app-tier
ports:
- 8080:8080
depends_on:
- postgres

# pgadmin:
# container_name: pgadmin
# image: dpage/pgadmin4:8.3
# restart: always
# environment:
# PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
# PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
# networks:
# - app-tier
# ports:
# - 8080:8080
# - 8080:80
# depends_on:
# - postgres

pgadmin:
container_name: pgadmin
image: dpage/pgadmin4:8.3
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
networks:
- app-tier
ports:
- 8080:80
depends_on:
- postgres
volumes:
postgres_data:

networks:
app-tier:
Expand Down
30 changes: 15 additions & 15 deletions public/codes/database/sqlite/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ services:
volumes:
- ./data:/db

sqlitebrowser:
image: lscr.io/linuxserver/sqlitebrowser:latest
container_name: sqlitebrowser
security_opt:
- seccomp:unconfined #optional
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
volumes:
- /path/to/config:/config
ports:
- 3000:3000
- 3001:3001
restart: unless-stopped
# sqlitebrowser:
# image: lscr.io/linuxserver/sqlitebrowser:latest
# container_name: sqlitebrowser
# security_opt:
# - seccomp:unconfined #optional
# environment:
# - PUID=1000
# - PGID=1000
# - TZ=Etc/UTC
# volumes:
# - /path/to/config:/config
# ports:
# - 3000:3000
# - 3001:3001
# restart: unless-stopped
Loading

0 comments on commit 57eb0fc

Please sign in to comment.