Skip to content

Commit

Permalink
feat: dev update
Browse files Browse the repository at this point in the history
  • Loading branch information
zgq354 committed Dec 28, 2024
1 parent 9234d03 commit b352e86
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
36 changes: 22 additions & 14 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,32 @@ services:
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

db:
image: mariadb:10.4
image: mysql:5.7
restart: unless-stopped
volumes:
- mariadb-data:/var/lib/mysql
volume:
- ./mysql/ngram.cnf:/etc/mysql/conf.d/ngram.cnf
- mysql-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: mariadb
MYSQL_DATABASE: mariadb
MYSQL_USER: mariadb
MYSQL_PASSWORD: mariadb

# Add "forwardPorts": ["3306"] to **devcontainer.json** to forward MariaDB locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
MYSQL_ROOT_PASSWORD: flarum
MYSQL_DATABASE: flarum
MYSQL_USER: flarum
MYSQL_PASSWORD: flarum

# phpmyadmin
phpmyadmin:
depends_on:
- db
image: phpmyadmin
restart: always
ports:
- "8090:80"
environment:
PMA_HOST: db
MYSQL_ROOT_PASSWORD: flarum
UPLOAD_LIMIT: 300M

volumes:
mariadb-data:
mysql-data:
app-data:
home:
2 changes: 2 additions & 0 deletions .devcontainer/mysql/ngram.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[mysqld]
ngram_token_size=2

0 comments on commit b352e86

Please sign in to comment.