Scribblerockerz / cryptletter

Self-hosted micro-service for encrypted self-destructing messages
MIT License
34 stars 5 forks source link

docker-compose not working #26

Closed changchichung closed 3 years ago

changchichung commented 3 years ago

my docker-compose.yml almost the same as the sample in README , only change ports to 8383

chchang@hqdc039:~/git/cryptletter$ cat docker-compose.yml 
# docker-compose.yml
version: '3'

services:
    redis:
        image: 'redis:alpine'
        ports:
            - '6379:6379'
    app:
        image: 'scribblerockerz/cryptletter:latest'
        command: './cryptletter'
        ports:
            - '8383:8080'
        links:
            - redis
        environment:
            - 'REDIS__ADDRESS=redis:6379'
            - 'APP__LOG_LEVEL=7'
chchang@hqdc039:~/git/cryptletter$ 

docker-compose up

chchang@hqdc039:~/git/cryptletter$ docker-compose up 
cryptletter_redis_1 is up-to-date
Starting cryptletter_app_1 ... done
Attaching to cryptletter_redis_1, cryptletter_app_1
app_1    | Cryptletter is a tiny service to exchange information securely.
app_1    | 
app_1    | Usage:
app_1    |   cryptletter [command]
app_1    | 
app_1    | Available Commands:
app_1    |   attachments:cleanup Trigger a cleanup of stored attachments
app_1    |   attachments:drop    Remove all stored attachments
app_1    |   attachments:list    List all known attachments
app_1    |   config:init         Generate a fresh config in the current directory
app_1    |   help                Help about any command
app_1    |   serve               Start the server
app_1    |   version             executables version
app_1    | 
app_1    | Flags:
app_1    |       --config string   config file (default is cryptletter.yaml)
app_1    |   -h, --help            help for cryptletter
app_1    | 
app_1    | Use "cryptletter [command] --help" for more information about a command.
redis_1  | 1:C 12 Aug 2021 01:28:55.633 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1  | 1:C 12 Aug 2021 01:28:55.633 # Redis version=6.2.5, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1  | 1:C 12 Aug 2021 01:28:55.633 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1  | 1:M 12 Aug 2021 01:28:55.634 * monotonic clock: POSIX clock_gettime
redis_1  | 1:M 12 Aug 2021 01:28:55.635 * Running mode=standalone, port=6379.
redis_1  | 1:M 12 Aug 2021 01:28:55.635 # Server initialized
redis_1  | 1:M 12 Aug 2021 01:28:55.635 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1  | 1:M 12 Aug 2021 01:28:55.635 * Ready to accept connections
cryptletter_app_1 exited with code 0

any suggestions ??

Scribblerockerz commented 3 years ago

Hey @changchichung ,

Add serve to the command or remove that line entirely:

command: './cryptletter serve'

There was a small issue in the quick usage section of the README.md, where the command overwrites the default from Dockerfile.

I fixed it, thanks!