Compare commits
2 Commits
7244b9bcc5
...
cdaac1b35d
| Author | SHA1 | Date | |
|---|---|---|---|
| cdaac1b35d | |||
| 02e28aba4a |
@@ -7,11 +7,11 @@ WORKDIR /app
|
|||||||
COPY gleam.toml manifest.toml ./
|
COPY gleam.toml manifest.toml ./
|
||||||
COPY src/ ./src/
|
COPY src/ ./src/
|
||||||
|
|
||||||
RUN gleam deps download && gleam build --target erlang
|
RUN gleam deps download && \
|
||||||
|
gleam build --target erlang && \
|
||||||
|
adduser -D -H spasteg && \
|
||||||
|
chown -R spasteg:spasteg /app
|
||||||
|
|
||||||
RUN adduser -D -H spasteg && chown -R spasteg:spasteg /app
|
|
||||||
|
|
||||||
ENV PORT=3000
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
USER spasteg
|
USER spasteg
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -77,17 +77,10 @@ docker build -t spasteg .
|
|||||||
Then run the container with:
|
Then run the container with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Generate a secure key
|
docker run -d --name pasteg -p <your_port>:3000 -e SECRET_KEY_BASE=$(openssl rand -base64 48) spasteg
|
||||||
docker run -p 3000:3000 -e SECRET_KEY_BASE=$(openssl rand -base64 48) spasteg
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use a custom port:
|
The key is generated at startup here, and the container exposes port 3000 so feel free to use the port you want. It also runs as a non-root user with a health check configured.
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run -p 8080:3000 -e SECRET_KEY_BASE=$(openssl rand -base64 48) -e PORT=3000 spasteg
|
|
||||||
```
|
|
||||||
|
|
||||||
The container exposes port 3000 and runs as a non-root user with a health check configured.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user