Skip to content

Commit

Permalink
Add mariadb via a docker container
Browse files Browse the repository at this point in the history
So we're using the same db server as production and staging
  • Loading branch information
mrchrisadams committed May 10, 2024
1 parent 6bcc78b commit fc6a429
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .env.gitpod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ PORT=9000
PYTHONDONTWRITEBYTECODE=1

SECRET_KEY='some-key'
DATABASE_URL=mysql://root@localhost:3306/greencheck
DATABASE_URL_READ_ONLY=mysql://root@localhost:3306/greencheck
DATABASE_URL=mysql://root:deploy@localhost:3306/greencheck
DATABASE_URL_READ_ONLY=mysql://root:deploy@localhost:3306/greencheck
EXPLORER_TOKEN="some-token"
MAILGUN_API_KEY="50 characters long-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Expand Down
14 changes: 13 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ tasks:
cp ./.env.gitpod ./.env
python -m venv .venv
source .venv/bin/activate
mysqladmin create greencheck
python -m pip install --upgrade pip uv
uv pip install -r requirements/requirements.linux.generated.txt
dotenv run -- ./manage.py migrate
Expand All @@ -31,6 +30,19 @@ tasks:
--name green-rabbit
rabbitmq:3.11
- name: mariadb
command: >
docker run
--rm
--hostname green-mariadb
-p 3306:3306
mariadb:10.11
env:
MARIADB_USER: deploy
MARIADB_PASSWORD: deploy
MARIADB_ROOT_PASSWORD: deploy
MARIADB_DATABASE: greencheck

- name: mailhog
command: >
docker run
Expand Down

0 comments on commit fc6a429

Please sign in to comment.