docker: Set timezone in TZ env var.
This commit is contained in:
parent
3217918f7c
commit
d6a1ff6030
@ -5,7 +5,7 @@ ENV LANG=C.UTF-8 \
|
|||||||
DATADIRS="/coindata"
|
DATADIRS="/coindata"
|
||||||
|
|
||||||
RUN apt-get update; \
|
RUN apt-get update; \
|
||||||
apt-get install -y wget python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config gosu;
|
apt-get install -y wget python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config gosu tzdata;
|
||||||
|
|
||||||
RUN wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/anonswap.zip && \
|
RUN wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/anonswap.zip && \
|
||||||
unzip coincurve-anonswap.zip && \
|
unzip coincurve-anonswap.zip && \
|
||||||
|
@ -715,6 +715,7 @@ class BasicSwap(BaseApp):
|
|||||||
def start(self):
|
def start(self):
|
||||||
self.log.info('Starting BasicSwap %s, database v%d\n\n', __version__, self.db_version)
|
self.log.info('Starting BasicSwap %s, database v%d\n\n', __version__, self.db_version)
|
||||||
self.log.info('sqlalchemy version %s', sa.__version__)
|
self.log.info('sqlalchemy version %s', sa.__version__)
|
||||||
|
self.log.info('timezone offset: %d (%s)', time.timezone, time.tzname[0])
|
||||||
|
|
||||||
self.upgradeDatabase(self.db_version)
|
self.upgradeDatabase(self.db_version)
|
||||||
|
|
||||||
|
@ -13,12 +13,14 @@ Docker must be installed and started:
|
|||||||
Should return a line containing `active (running)`
|
Should return a line containing `active (running)`
|
||||||
|
|
||||||
|
|
||||||
Create the images:
|
#### Create the images:
|
||||||
|
|
||||||
$ cd basicswap/docker
|
$ cd basicswap/docker
|
||||||
$ docker-compose build
|
$ docker-compose build
|
||||||
|
|
||||||
Prepare the datadir:
|
|
||||||
|
#### Prepare the datadir:
|
||||||
|
|
||||||
Set XMR_RPC_HOST and BASE_XMR_RPC_PORT to a public XMR node or exclude to run a local node.
|
Set XMR_RPC_HOST and BASE_XMR_RPC_PORT to a public XMR node or exclude to run a local node.
|
||||||
Set xmrrestoreheight to the current xmr chain height.
|
Set xmrrestoreheight to the current xmr chain height.
|
||||||
Adjust `--withcoins` and `--withoutcoins` as desired, eg: `--withcoins=monero,bitcoin`. By default only Particl is loaded.
|
Adjust `--withcoins` and `--withoutcoins` as desired, eg: `--withcoins=monero,bitcoin`. By default only Particl is loaded.
|
||||||
@ -27,10 +29,16 @@ Adjust `--withcoins` and `--withoutcoins` as desired, eg: `--withcoins=monero,bi
|
|||||||
$ docker run --rm -e XMR_RPC_HOST="node.xmr.to" -e BASE_XMR_RPC_PORT=18081 -t --name swap_prepare -v $COINDATA_PATH:/coindata i_swapclient \
|
$ docker run --rm -e XMR_RPC_HOST="node.xmr.to" -e BASE_XMR_RPC_PORT=18081 -t --name swap_prepare -v $COINDATA_PATH:/coindata i_swapclient \
|
||||||
basicswap-prepare --datadir=/coindata --withcoins=monero --htmlhost="0.0.0.0" --xmrrestoreheight=2245107
|
basicswap-prepare --datadir=/coindata --withcoins=monero --htmlhost="0.0.0.0" --xmrrestoreheight=2245107
|
||||||
|
|
||||||
Record the mnemonic from the output of the above command.
|
**Record the mnemonic from the output of the above command.**
|
||||||
|
|
||||||
|
|
||||||
Start the container
|
#### Set the timezone:
|
||||||
|
|
||||||
|
Edit the `.env` file in the docker directory, set TZ to your local timezone.
|
||||||
|
Valid options can be listed with: `timedatectl list-timezones`
|
||||||
|
|
||||||
|
|
||||||
|
#### Start the container:
|
||||||
|
|
||||||
$ export COINDATA_PATH=/var/data/coinswaps
|
$ export COINDATA_PATH=/var/data/coinswaps
|
||||||
$ docker-compose up
|
$ docker-compose up
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
HTML_PORT=127.0.0.1:12700:12700
|
HTML_PORT=127.0.0.1:12700:12700
|
||||||
#COINDATA_PATH=/var/data/coinswaps
|
#COINDATA_PATH=/var/data/coinswaps
|
||||||
|
TZ=UTC
|
||||||
|
@ -10,6 +10,8 @@ services:
|
|||||||
- ${COINDATA_PATH}:/coindata
|
- ${COINDATA_PATH}:/coindata
|
||||||
ports:
|
ports:
|
||||||
- "${HTML_PORT}" # Expose only to localhost, see .env
|
- "${HTML_PORT}" # Expose only to localhost, see .env
|
||||||
|
environment:
|
||||||
|
- TZ
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
coindata:
|
coindata:
|
||||||
|
@ -1 +1,2 @@
|
|||||||
HTML_PORT=127.0.0.1:12700:12700
|
HTML_PORT=127.0.0.1:12700:12700
|
||||||
|
TZ=UTC
|
||||||
|
@ -61,6 +61,8 @@ services:
|
|||||||
- /var/swapdata/swapclient:/data
|
- /var/swapdata/swapclient:/data
|
||||||
ports:
|
ports:
|
||||||
- "${HTML_PORT}" # Expose only to localhost, see .env
|
- "${HTML_PORT}" # Expose only to localhost, see .env
|
||||||
|
environment:
|
||||||
|
- TZ
|
||||||
depends_on:
|
depends_on:
|
||||||
- particl_core
|
- particl_core
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -5,7 +5,7 @@ ENV LANG=C.UTF-8 \
|
|||||||
DATADIR=/data
|
DATADIR=/data
|
||||||
|
|
||||||
RUN apt-get update; \
|
RUN apt-get update; \
|
||||||
apt-get install -y wget python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config gosu;
|
apt-get install -y wget python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config gosu tzdata;
|
||||||
|
|
||||||
RUN wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/anonswap.zip && \
|
RUN wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/anonswap.zip && \
|
||||||
unzip coincurve-anonswap.zip && \
|
unzip coincurve-anonswap.zip && \
|
||||||
|
Loading…
Reference in New Issue
Block a user