Commit a3166d8 1 parent 2c345e8 commit a3166d8 Copy full SHA for a3166d8
File tree 3 files changed +51
-12
lines changed
3 files changed +51
-12
lines changed Original file line number Diff line number Diff line change 1
1
SERVER_PORT = 4001
2
- PGSQL_URL = postgresql://postgres:password@localhost :5432/postgres
2
+ PGSQL_URL = postgresql://postgres:postgres@db :5432/postgres
3
3
POSTGRES_DATABASE = postgres
4
4
POSTGRES_PASSWORD = postgres
5
5
REDIS_PASSWORD = password
Original file line number Diff line number Diff line change
1
+ name : Deploy latest docker image build to hub
2
+
3
+ on :
4
+ # push:
5
+ # branches:
6
+ # - main
7
+
8
+ workflow_dispatch :
9
+ inputs :
10
+ image :
11
+ description : ' Enter the latest image tag'
12
+ required : true
13
+
14
+ jobs :
15
+ deploy-docker-to-hub :
16
+ runs-on : ubuntu-latest
17
+ if : |
18
+ ${{ github.ref == 'refs/heads/main' }} &&
19
+ ${{ github.event_name == 'workflow_dispatch' }}
20
+
21
+ steps :
22
+ - name : Checkout code
23
+ uses : actions/checkout@v2
24
+ with :
25
+ ref : refs/heads/main
26
+
27
+ - name : Docker Login
28
+ uses : docker/login-action@v3
29
+ with :
30
+ username : ${{ secrets.DOCKER_USERNAME }}
31
+ password : ${{ secrets.DOCKER_TOKEN }}
32
+
33
+ - name : Build docker images
34
+ run : docker-compose build
35
+
36
+ - name : Push docker images to docker hub
37
+ run : docker-compose push
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ services:
12
12
POSTGRES_DB : ${POSTGRES_DATABASE:-postgres}
13
13
POSTGRES_PASSWORD : ${POSTGRES_PASSWORD:-postgres}
14
14
healthcheck :
15
- test : ["CMD-SHELL", "pg_isready -U postgres"]
15
+ test : [ "CMD-SHELL", "pg_isready -U postgres" ]
16
16
interval : 10s
17
17
timeout : 5s
18
18
retries : 5
@@ -22,43 +22,45 @@ services:
22
22
ports :
23
23
- ' 6379:6379'
24
24
command : redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
25
- volumes :
25
+ volumes :
26
26
- cache:/data
27
27
db-seed :
28
- build :
28
+ build :
29
29
dockerfile : packages/backend/db-seed.Dockerfile
30
30
context : " ./"
31
31
args :
32
32
PGSQL_URL : postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DATABASE}
33
33
depends_on :
34
34
- db
35
- profiles : ["tools"]
35
+ profiles : [ "tools" ]
36
36
ui :
37
- build :
37
+ build :
38
38
dockerfile : packages/client/Dockerfile
39
39
context : " ./"
40
+ image : revertengg/revert-ui-ce
40
41
env_file :
41
42
- packages/client/.env
42
- ports :
43
+ ports :
43
44
- 3000:3000
44
- api :
45
- build :
45
+ api :
46
+ build :
46
47
dockerfile : packages/backend/Dockerfile
47
48
context : " ./"
48
49
args :
49
50
PGSQL_URL : postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DATABASE}
50
51
SERVER_PORT : ${SERVER_PORT}
51
52
REDIS_SERVER_URL : redis://${REDIS_USER}:${REDIS_PASSWORD}@cache:6379
53
+ image : revertengg/revert-api-ce
52
54
env_file :
53
55
- packages/backend/.env
54
56
ports :
55
57
- 4001:4001
56
58
depends_on :
57
59
db :
58
- condition : service_healthy # Wait for db service to be healthy
59
- cache :
60
+ condition : service_healthy # Wait for db service to be healthy
61
+ cache :
60
62
condition : service_started
61
63
62
64
volumes :
63
65
pgdata :
64
- cache:
66
+ cache :
You can’t perform that action at this time.
0 commit comments