Skip to content

Commit

Permalink
fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
C10udburst committed Jul 11, 2023
1 parent 6b2d79c commit 25d75a4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 138 deletions.
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ FROM alpine:latest
# Install system dependencies
RUN apk --no-cache add ca-certificates

# Create a group and user
RUN addgroup -S chunkdrive && adduser -S chunkdrive -G chunkdrive
USER chunkdrive:chunkdrive

# Set the working directory inside the container
WORKDIR /app

# Copy the binary
COPY ./target/*/release/chunkdrive ./
COPY --chown=root:root ./target/*/release/chunkdrive ./

# Copy the style.css file
COPY style.css ./
COPY --chown=root:root style.css ./

# Set permissions
RUN chmod 755 chunkdrive
RUN chmod 644 style.css

# Create a group and user
RUN addgroup -S chunkdrive && adduser -S chunkdrive -G chunkdrive
USER chunkdrive:chunkdrive

# Set the command to run the application
CMD ["/app/chunkdrive"]
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ services:
- `address` specifies the address to listen on.
- `see_root` makes the `/` directory visible. Useful if you want to make a share server where users need to explicitly specify the descriptor to access data.
- `readonly` makes the server read-only.
- `style_path` specifies a path to a CSS file that will be used to style the web interface.

- `style_path` specifies a path to a CSS file that will be used to style the web interface. Tip: if you want to make minor changes, you should edit [./style/src/config.css](./style/src/config.css) and run `npm run build` to generate a new CSS file.
The HTTP server does not handle authentication or SSL. It was designed to be used behind a reverse proxy like nginx.

It does not use any JavaScript :sunglasses:
Expand Down
1 change: 0 additions & 1 deletion style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"postcss": "^8.4.25",
"postcss-cli": "^10.1.0",
"postcss-focus": "^6.0.0",
"postcss-font-magician": "^3.0.0",
"postcss-import": "^15.1.0",
"postcss-import-url": "^7.2.0",
"postcss-simple-vars": "^7.0.1",
Expand Down
126 changes: 0 additions & 126 deletions style/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions style/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ module.exports = {
require('postcss-import-url')(),
require('postcss-variable-compress')(),
require('cssnano')({
preset: 'default',
}),
require('postcss-font-magician')()
preset: 'default'
})
]
}

0 comments on commit 25d75a4

Please sign in to comment.