mirror of
https://git.wownero.com/lza_menace/wownero-explorer.git
synced 2024-08-15 01:03:26 +00:00
adding the docker bits to get ready to serve it for real
This commit is contained in:
parent
0a7170a08b
commit
308a0b59e4
5 changed files with 59 additions and 0 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
target/
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,4 @@
|
|||
/target
|
||||
docker-compose.prod.yml
|
||||
docker-compose.stage.yml
|
||||
docker-compose.dev.yml
|
||||
|
|
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
FROM ubuntu:19.10
|
||||
|
||||
RUN apt-get update && apt-get install -y build-essential
|
||||
|
||||
RUN apt-get install -y curl git
|
||||
|
||||
RUN useradd -m -d /home/wownero-explorer wownero-explorer
|
||||
|
||||
RUN mkdir -p /srv && chown -R wownero-explorer:wownero-explorer /srv
|
||||
|
||||
USER wownero-explorer
|
||||
WORKDIR /srv
|
||||
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | RUSTUP_HOME=/home/wownero-explorer/.rustup sh -s -- -y
|
||||
RUN git clone https://git.wownero.com/lza_menace/wownero-explorer && \
|
||||
cd wownero-explorer && \
|
||||
~/.cargo/bin/rustup override set nightly && \
|
||||
~/.cargo/bin/cargo build --release
|
||||
|
||||
WORKDIR /srv/wownero-explorer
|
||||
|
||||
CMD './target/release/wownero-explorer'
|
10
docker-compose.example.yml
Normal file
10
docker-compose.example.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
version: '3'
|
||||
services:
|
||||
wownero-explorer:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
labels:
|
||||
- "traefik.http.routers.whoami.rule=Host(`<external dns name>`)"
|
||||
environment:
|
||||
DAEMON_URI: ${DAEMON_URI}
|
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
version: '3'
|
||||
services:
|
||||
reverse-proxy:
|
||||
image: traefik:v2.2
|
||||
command: --api.insecure=true --providers.docker
|
||||
ports:
|
||||
# The HTTP port
|
||||
- "8080:80"
|
||||
# The Web UI (enabled by --api.insecure=true)
|
||||
- "9000:8080"
|
||||
volumes:
|
||||
# So that Traefik can listen to the Docker events
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
wownero-explorer:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
labels:
|
||||
- "traefik.http.routers.explorer.rule=Host(`localhost:8000`)"
|
||||
environment:
|
||||
DAEMON_URI: ${DAEMON_URI}
|
||||
ports:
|
||||
- "8000:8000"
|
Loading…
Reference in a new issue