forked from jef/streetmerchant
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docker): run in docker, and build scripts for docker (jef#1291)
Updates unnecessary need to grant special privileges when running in Docker.
- Loading branch information
1 parent
deaf084
commit 273d1b0
Showing
5 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.DEFAULT_GOAL := run | ||
|
||
.PHONY: build | ||
build: | ||
docker-compose build streetmerchant | ||
|
||
.PHONY: run | ||
run: | ||
docker-compose up | ||
|
||
.PHONY: run-detached | ||
run-detached: | ||
docker-compose up -d | ||
|
||
.PHONY: stop | ||
stop: | ||
docker-compose down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3.0' | ||
services: | ||
streetmerchant: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
container_name: streetmerchant | ||
env_file: .env | ||
# ports: | ||
# - 7997:7997 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Docker | ||
|
||
You will need: | ||
* `docker` (tested on Docker version 19.03.13-ce, build 4484c46d9d) | ||
* `make` (not a strict requirement, but helps out with stages) | ||
* `docker-compose` (tested on docker-compose version 1.27.4,) | ||
|
||
## What | ||
It is assumed you know what docker is. | ||
You can build and run this project inside docker, headless. All the depencies will be downloaded in to the docker image. | ||
|
||
## Why | ||
There is no need to install node, or anything else (apart from above) on your machine to run this. | ||
|
||
## How | ||
|
||
1. Copy pasta the `.env-example` in to `.env`. | ||
2. Edit `.env` in your favourite editor, pick stores, options what ever you want. | ||
3. If you have make, simply run `make` in your terminal to get started. You should see a docker build, and container start automatically. | ||
4. If you want a webserver running, so you can edit the options via web interface, uncomment lines 13-14 in `docker-compose.yml` to open up ports `7997`. Update `.env` file `WEB_PORT="7997"` this is so the service listens on `7997` and we expose the same ports on docker. | ||
5. If you do not have make, because windows, run these commands in order: | ||
``` | ||
docker-compose build streetmerchant-shop-bot | ||
docker-compose up | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters