@@ -5,45 +5,26 @@ This container will create a backup of the osm-seed-db and compress according to
5
5
6
6
### Configuration
7
7
8
- To run the container needs a bunch of ENV variables :
8
+ In order to run this container we need environment variables, these can be found in the following files👇 :
9
9
10
- - ` POSTGRES_HOST ` - Database host
11
- - ` POSTGRES_DB ` - Database name
12
- - ` POSTGRES_USER ` - Database user
13
- - ` POSTGRES_PASSWORD ` - Database user's password
10
+ - [ .env.db.example] ( ./../../.env.db.example )
11
+ - [ .env.backup-restore.example] ( ./../../.env.backup-restore.example )
12
+ - [ .env.cloudprovider.example] ( ./../../.env.cloudprovider.example )
14
13
15
- The following env variables are according to which cloud provider you are going to use:
16
-
17
- - ` CLOUDPROVIDER ` , eg. ` aws ` or ` gcp `
18
-
19
- In case AWS:
20
-
21
- - ` AWS_S3_BUCKET ` e.g ` s3://osm-seed-test `
22
-
23
- In case GCP:
24
-
25
- - ` GCP_STORAGE_BUCKET ` e.g ` gs://osm-seed-test `
26
-
27
- * Database action*
28
-
29
- - ` DB_ACTION ` e.g ` backup ` or ` restore `
30
-
31
- Change the ` DB_ACTION ` variable to restore or backup the database. ` DB_ACTION ` = ` restore ` or ` backup `
32
-
33
- ### Building the container
34
-
35
- ```
36
- cd db-backup-restore/
37
- docker network create osm-seed_default
38
- docker build -t osmseed-db-backup-restore:v1 .
39
- ```
14
+ ** Note** : Make a copy and rename the files as ` .env.db ` , ` .env.backup-restore ` and ` .env.cloudprovider `
40
15
41
16
### Running the container
42
17
43
-
18
+ ``` sh
19
+ # Docker compose
20
+ docker-compose run db-backup-restore
21
+
22
+ # Docker compose
23
+ docker run \
24
+ --env-file ./../.env.db \
25
+ --env-file ./../.env.backup-restore \
26
+ --env-file ./../.env.cloudprovider \
27
+ --network osm-seed_default \
28
+ -it osmseed-db-backup-restore:v1
44
29
```
45
- docker run \
46
- --env-file ./../.env \
47
- --network osm-seed_default \
48
- -it osmseed-db-backup-restore:v1
49
- ```
30
+
0 commit comments