Commit d3e1136 1 parent 832f215 commit d3e1136 Copy full SHA for d3e1136
File tree 3 files changed +56
-3
lines changed
3 files changed +56
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : Release Simulator
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches : [main]
7
+ paths :
8
+ - " simulator/**"
9
+
10
+ concurrency :
11
+ group : ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress : true
13
+
14
+ env :
15
+ REGISTRY : ghcr.io
16
+ GITHUB_REPO : ${{ github.repository }}
17
+
18
+ jobs :
19
+ docker :
20
+ permissions :
21
+ contents : read
22
+ packages : write
23
+
24
+ runs-on : ubuntu-20.04
25
+ steps :
26
+ - uses : actions/checkout@v3
27
+
28
+ - name : Log in to the Container registry
29
+ uses : docker/login-action@v3
30
+ with :
31
+ registry : ${{ env.REGISTRY }}
32
+ username : ${{ github.actor }}
33
+ password : ${{ secrets.GITHUB_TOKEN }}
34
+
35
+ - name : Extract metadata (tags, labels) for Docker
36
+ id : meta
37
+ uses : docker/metadata-action@v5
38
+ with :
39
+ images : ${{ env.REGISTRY }}/${{ env.GITHUB_REPO }}-simulator
40
+ tags : |
41
+ type=raw,value=latest
42
+ type=raw,value=stable,enable=${{ github.event_name == 'release' }}
43
+ type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }}
44
+ type=sha,priority=250,enable=${{ github.event_name == 'workflow_dispatch' }}
45
+
46
+ - name : Build and push Docker image
47
+ uses : docker/build-push-action@v6
48
+ with :
49
+ context : .
50
+ push : true
51
+ tags : ${{ steps.meta.outputs.tags }}
52
+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ RUN cd /temp && bun install --frozen-lockfile --production
14
14
# copy production dependencies and source code into final image
15
15
FROM base AS release
16
16
COPY --from=install /temp/node_modules node_modules
17
- COPY src src
17
+ COPY . .
18
18
19
19
# run the app
20
20
USER bun
21
21
EXPOSE 3000/tcp
22
- ENTRYPOINT [ "bun" , "run" , "src/ app.ts" ]
22
+ ENTRYPOINT [ "bun" , "run" , "app.ts" ]
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ import amqplib from "amqplib";
2
2
3
3
const EXCHANGE = "exchange" ;
4
4
5
- const connection = await amqplib . connect ( "amqp://localhost:5672" ) ;
5
+ const url = process . env . RABBITMQ_URL || "amqp://localhost:5672" ;
6
+ const connection = await amqplib . connect ( url ) ;
6
7
7
8
const channel = await connection . createChannel ( ) ;
8
9
You can’t perform that action at this time.
0 commit comments