Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In Travis we used a tmpfs volume before. Using tmpfs volume seems not to be possible in CircleCI as not all native docker / docker-compose commands are supported. The official CircleCI database images mount as well /dev/shm to make use of an in memory database. Changing Travis is mostly done to maintain the same setup in CircleCI and Travis. We also need to call the command directly in the config.yml and the database container does not have a git checkout, therefore calling ./contrib/start_test_db is not possible. See for the official CircleCI images: https://hub.docker.com/r/circleci/mysql/tags/
- Loading branch information
Showing
3 changed files
with
8 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#!/bin/bash | ||
# Copy our data dir to the tmpfs mount | ||
cp -a /var/lib/mysql/* /var/lib/mysql_tmpfs | ||
cp -a /var/lib/mysql/* /dev/shm | ||
# Remove all our databases | ||
rm -rf /var/lib/mysql_tmpfs/api* | ||
rm -rf /dev/shm/api* | ||
# Configure the new datadir | ||
echo -e "[mysqld]\ndatadir = /var/lib/mysql_tmpfs" > /etc/my.cnf.d/obs.cnf | ||
echo -e "[mysqld]\ndatadir = /dev/shm" > /etc/my.cnf.d/obs.cnf | ||
/usr/lib/mysql/mysql-systemd-helper start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters