File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 postgres-db :
2020 image : postgres:15
2121 env :
22- POSTGRES_USER : testuser
23- POSTGRES_PASSWORD : testpass
24- POSTGRES_DB : testdb
22+ POSTGRES_USER : myuser
23+ POSTGRES_PASSWORD : mypass
24+ POSTGRES_DB : mydatabase
2525 ports :
2626 - 5432:5432
2727 options : >-
3131 --health-retries 5
3232
3333
34+
3435 steps :
3536 - name : Checkout repo
3637 uses : actions/checkout@v4
4546 run : docker network create ci_network || echo "Network ci_network already exists"
4647
4748 - name : Connect Postgres service to network
48- run : docker network connect ci_network postgres || echo "Postgres already connected"
49+ run : docker network connect ci_network postgres-db || echo "Postgres already connected"
50+
4951
5052 - name : Run backup script test
5153 run : |
5456 --network ci_network \
5557 -e DB_HOST=postgres-db \
5658 -e DB_PORT=5432 \
57- -e DB_USER=testuser \
58- -e DB_PASSWORD=testpass \
59- -e DB_NAME=testdb \
59+ -e DB_USER=myuser \
60+ -e DB_PASSWORD=mypass \
61+ -e DB_NAME=mydatabase \
6062 -e BACKUP_DIR=/mnt/backups \
6163 -e RETENTION_DAYS=7 \
6264 -e ENCRYPT=false \
You can’t perform that action at this time.
0 commit comments