Skip to content

Commit

Permalink
Deploy in docker container (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed May 18, 2024
1 parent 6e7b9ae commit 52281e0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
workflow_dispatch:

jobs:
release:
name: Release
release-package:
name: Release package
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down Expand Up @@ -41,7 +41,8 @@ jobs:
files: 'dkg-frontend-${{ env.TAG_NAME }}.tar.gz'
prerelease: ${{ contains(github.ref, '.rc') && 'true' || 'false' }}

release-dkg-frontend:
release-docker-image:
name: Release docker image
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ FROM nginx as production-stage
COPY --from=build-stage /app/dist /var/www/dkg

# Copy the Nginx configuration file
COPY config/nginx.docker.conf /etc/nginx/conf.d/default.conf
COPY config/nginx.docker.conf /etc/nginx/conf.d/default.conf.template
COPY config/.htaccess /var/www/dkg

EXPOSE 80
EXPOSE 443

CMD ["nginx", "-g", "daemon off;"]
CMD /bin/bash -c "envsubst < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
4 changes: 2 additions & 2 deletions config/nginx.docker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ server {
listen [::]:80 ;
listen 443 ssl ;
listen [::]:443 ssl ;
ssl_certificate /etc/nginx/certificate/s.crt;
ssl_certificate_key /etc/nginx/certificate/s.key;
ssl_certificate ${NGINX_SSL_CERTIFICATE_PATH};
ssl_certificate_key ${NGINX_SSL_CERTIFICATE_KEY_PATH};
root /var/www/dkg;
index index.html;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dkg-frontend",
"version": "0.6.4",
"version": "0.6.5",
"private": true,
"scripts": {
"dev": "vite",
Expand Down

0 comments on commit 52281e0

Please sign in to comment.