Skip to content

Commit 4726a5d

Browse files
committed
Update docker file.
1 parent 7097832 commit 4726a5d

File tree

3 files changed

+23
-26
lines changed

3 files changed

+23
-26
lines changed

.github/workflows/deploy.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
name: Test and deploy
1+
name: Build
22

33
env:
4-
APP_NAME: CMS-FE
5-
PROJECT_NAME: CMS-FE
4+
APP_NAME: CMS-BACKEND-API
5+
PROJECT_NAME: CMS-BACKEND-API
66
DOCKER_COMPOSE_PATH: /root/app/docker-compose.yml
77
REGISTRY: ghcr.io
8-
DOCKER_REGISTRY: ghcr.io/code4govtech/dmp-cms-fe
9-
DOT_ENV_FILE_NAME: env.dmp-cms-fe
8+
DOCKER_REGISTRY: ghcr.io/code4govtech/dmp-cms-backend-api
9+
DOT_ENV_FILE_NAME: env.dmp-cms-backend-api
10+
1011

1112
on:
1213
workflow_dispatch:
1314
push:
1415
branches:
15-
- main
16+
- devops
1617
- dev
18+
- main
1719

1820
permissions:
1921
contents: write
@@ -53,20 +55,20 @@ jobs:
5355
build:
5456
name: Build
5557
runs-on: ubuntu-latest
56-
needs: [ set_vars ]
58+
needs: [set_vars]
5759
permissions:
5860
contents: read
5961
packages: write
6062
env:
6163
TAG_LATEST: ${{ needs.set_vars.outputs.TAG_LATEST }}
6264
TAG_ENV_COMMIT: ${{ needs.set_vars.outputs.TAG_ENV_COMMIT }}
63-
strategy:
64-
matrix:
65-
node-version: [ 16.x ]
6665
steps:
67-
- name: Checkout repository
66+
- name: Checkout code
6867
uses: actions/checkout@v2
6968

69+
# - name: Login to GitHub Packages
70+
# run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
71+
7072
- name: Log in to the Container registry
7173
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
7274
with:
@@ -77,6 +79,11 @@ jobs:
7779
- name: Set Docker Tags
7880
uses: actions/setup-node@v2
7981

82+
- name: Read Secrets
83+
run: |
84+
touch .env
85+
mv .env ${{ env.DOT_ENV_FILE_NAME }}
86+
8087
- name: Copy env file to DEV Server
8188
uses: appleboy/[email protected]
8289
if: needs.set_vars.outputs.APP_ENV == 'DEV'

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ FROM prod as serve
2525
## Expose the port that Docusaurus will run on.
2626
EXPOSE 3000
2727
## Run the production server.
28-
CMD ["npm", "run", "serve", "--", "--host", "0.0.0.0", "--no-open"]
28+
CMD ["npm", "run", "serve", "--", "--host", "0.0.0.0"]

docker-compose.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
1-
# This could be very wrong.
21
name: "docusaurus"
32
services:
4-
caddy:
3+
serve:
54
build:
65
context: .
7-
target: caddy
6+
target: serve
87
ports:
9-
- "80:80"
10-
- "443:443"
8+
- "3000:3000"
119
environment:
12-
- NODE_ENV=production
13-
- DOCUSAURUS_DOMAIN=docusaurus.example
14-
15-
volumes:
16-
- caddy_data:/data
17-
- caddy_config:/config
18-
volumes:
19-
caddy_data:
20-
caddy_config:
10+
- NODE_ENV=production

0 commit comments

Comments
 (0)