Compare commits

...

3 Commits

Author SHA1 Message Date
Elias Schneider
856c54d5d6 release: 1.7.1 2024-12-24 17:18:38 +01:00
Elias Schneider
6a97cc279c fix: incorrect ownership of the public folder 2024-12-24 16:07:35 +01:00
Elias Schneider
7e09ae1f98 chore: change location of Caddyfiles 2024-12-24 16:06:59 +01:00
12 changed files with 34 additions and 28 deletions

View File

@@ -1,3 +1,10 @@
## [1.7.1](https://github.com/stonith404/pingvin-share/compare/v1.7.0...v1.7.1) (2024-12-24)
### Bug Fixes
* incorrect ownership of the public folder ([6a97cc2](https://github.com/stonith404/pingvin-share/commit/6a97cc279c51bf125b9b516d1795f85b208e6ad5))
## [1.7.0](https://github.com/stonith404/pingvin-share/compare/v1.6.1...v1.7.0) (2024-12-19) ## [1.7.0](https://github.com/stonith404/pingvin-share/compare/v1.6.1...v1.7.0) (2024-12-19)

View File

@@ -53,7 +53,7 @@ COPY --from=backend-builder /opt/app/package.json ./
WORKDIR /opt/app WORKDIR /opt/app
COPY ./reverse-proxy /etc/caddy COPY ./reverse-proxy /opt/app/reverse-proxy
COPY ./scripts ./scripts COPY ./scripts ./scripts
EXPOSE 3000 EXPOSE 3000

View File

@@ -1,12 +1,12 @@
{ {
"name": "pingvin-share-backend", "name": "pingvin-share-backend",
"version": "1.7.0", "version": "1.7.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "pingvin-share-backend", "name": "pingvin-share-backend",
"version": "1.7.0", "version": "1.7.1",
"dependencies": { "dependencies": {
"@aws-sdk/client-s3": "^3.679.0", "@aws-sdk/client-s3": "^3.679.0",
"@nestjs/cache-manager": "^2.2.2", "@nestjs/cache-manager": "^2.2.2",

View File

@@ -1,6 +1,6 @@
{ {
"name": "pingvin-share-backend", "name": "pingvin-share-backend",
"version": "1.7.0", "version": "1.7.1",
"scripts": { "scripts": {
"build": "nest build", "build": "nest build",
"dev": "cross-env NODE_ENV=development nest start --watch", "dev": "cross-env NODE_ENV=development nest start --watch",

View File

@@ -1,12 +1,12 @@
{ {
"name": "pingvin-share-frontend", "name": "pingvin-share-frontend",
"version": "1.7.0", "version": "1.7.1",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "pingvin-share-frontend", "name": "pingvin-share-frontend",
"version": "1.7.0", "version": "1.7.1",
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.3",
"@emotion/server": "^11.11.0", "@emotion/server": "^11.11.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "pingvin-share-frontend", "name": "pingvin-share-frontend",
"version": "1.7.0", "version": "1.7.1",
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "pingvin-share", "name": "pingvin-share",
"version": "1.7.0", "version": "1.7.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "pingvin-share", "name": "pingvin-share",
"version": "1.7.0", "version": "1.7.1",
"devDependencies": { "devDependencies": {
"conventional-changelog-cli": "^3.0.0" "conventional-changelog-cli": "^3.0.0"
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "pingvin-share", "name": "pingvin-share",
"version": "1.7.0", "version": "1.7.1",
"scripts": { "scripts": {
"format": "cd frontend && npm run format && cd ../backend && npm run format", "format": "cd frontend && npm run format && cd ../backend && npm run format",
"lint": "cd frontend && npm run lint && cd ../backend && npm run lint", "lint": "cd frontend && npm run lint && cd ../backend && npm run lint",

View File

@@ -1,7 +1,7 @@
:3000 { :3000 {
# Reverse proxy for /api # Reverse proxy for /api
reverse_proxy /api/* http://localhost:{$BACKEND_PORT:8080} reverse_proxy /api/* http://localhost:{$BACKEND_PORT:8080}
# Reverse proxy for all other requests # Reverse proxy for all other requests
reverse_proxy http://localhost:{$PORT:3333} reverse_proxy http://localhost:{$PORT:3333}
} }

View File

@@ -1,14 +1,11 @@
:3000 { :3000 {
reverse_proxy /* http://localhost:{$PORT:3333} { # Reverse proxy for /api
trusted_proxies 0.0.0.0/0 reverse_proxy /api/* http://localhost:{$BACKEND_PORT:8080} {
} trusted_proxies 0.0.0.0/0
}
reverse_proxy /api/* http://localhost:{$BACKEND_PORT:8080} { # Reverse proxy for all other requests
trusted_proxies 0.0.0.0/0 reverse_proxy /* http://localhost:{$PORT:3333} {
} trusted_proxies 0.0.0.0/0
}
log { }
output file /var/log/caddy/access.log
level WARN
}
}

View File

@@ -25,6 +25,8 @@ fi
# Change ownership of the data directory # Change ownership of the data directory
mkdir -p /opt/app/backend/data mkdir -p /opt/app/backend/data
find /opt/app/backend/data \( ! -group "${PGID}" -o ! -user "${PUID}" \) -exec chown "${PUID}:${PGID}" {} + find /opt/app/backend/data \( ! -group "${PGID}" -o ! -user "${PUID}" \) -exec chown "${PUID}:${PGID}" {} +
# Change ownership of the frontend public directory
find /opt/app/frontend/public \( ! -group "${PGID}" -o ! -user "${PUID}" \) -exec chown "${PUID}:${PGID}" {} +
# Switch to the non-root user # Switch to the non-root user
exec su-exec "$PUID:$PGID" "$@" exec su-exec "$PUID:$PGID" "$@"

View File

@@ -5,9 +5,9 @@ cp -rn /tmp/img/* /opt/app/frontend/public/img
# Start Caddy # Start Caddy
if [ "$TRUST_PROXY" = "true" ]; then if [ "$TRUST_PROXY" = "true" ]; then
caddy start --adapter caddyfile --config /etc/caddy/Caddyfile.trust-proxy & caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile.trust-proxy &
else else
caddy start --adapter caddyfile --config /etc/caddy/Caddyfile & caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile &
fi fi
# Run the frontend server # Run the frontend server