Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #19 from janithcooray/sync-change
Browse files Browse the repository at this point in the history
Sync change
  • Loading branch information
janithcooray authored Jul 2, 2022
2 parents 720425c + b8d2ba9 commit 0649bb3
Show file tree
Hide file tree
Showing 15 changed files with 1,461 additions and 365 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ containers: #Array
- name-of-container: #Array - must be defined in docker-compose or name container on start
volumes: # Bind Mounts - Array
- volume: # Item - config for each bind
profile: local # profile names will group volumes, can use run <profilename> to activate only the volumes in the group. if empty it will be activated too.
from: app/ # From location relative to <ProjectRoot> => app/ || does not support ./app yet
to: /var/www/html/ # to location inside docker container
mode: 775 # Mode to write files
Expand All @@ -49,6 +50,26 @@ containers: #Array
- node_modules/
replace: # replace these strings when copying
- 'localhost:mysql-db'

database:
driver: mysql # Currently only mysql is supported
profile: staging # Profiles
method: export # [ export | dump ]
file: /path/to/dump.sql #[ ./relative | /absolute ]/path/to/dump.sql . will only be used when method is in export
server: # externel server config
database_user: user
database_name: dbname
database_pass: pass
host: server.name
port: 3306
local: # local server config. external servers can be used too
provision: true # drop db if it exists, create if not exist. needs root password
database_user: user
database_name: dbname
database_pass: pass
root_password: root_password # only used for provision function
host: localhost
port: 3306
```
## Example
Expand Down Expand Up @@ -80,6 +101,7 @@ containers:
- mytest-container:
volumes:
- volume:
profile: local
from: app/
to: /var/www/html/
mode: 775
Expand All @@ -105,3 +127,23 @@ Once Containers are online run the following in the root directory
```sh
npx syncstat run
```

running profiles

```sh
npx syncstat run <profilename>
```

when using run `<profilename>`, only volumes that match the profile name will be added. volumes without profile names will be added as well.

### Running DB

```sh
npx syncstat db
```

or with profiles

```sh
npx syncstat db <profile>
```
Loading

0 comments on commit 0649bb3

Please sign in to comment.