Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '2'
- services:
- db:
- image: postgres
- environment:
- - POSTGRES_PASSWORD=wikitelegrambot
- command: psql -U postgres
- command: CREATE TABLE users(ID SERIAL PRIMARY KEY, TIMESTAMP TIMESTAMP DEFAULT CURRENT_TIMESTAMP, USERNAME TEXT, CHAT_ID INT, MESSAGE TEXT, ANSWER TEXT);
- bot:
- image: alpine
- volumes:
- - /code:/lib
- command: sh -c "cd lib && cd code && apk add --no-cache ca-certificates && chmod +x code && ./code"
- Creating network "telegrambotgo_default" with the default driver
- Creating telegrambotgo_bot_1 ... done
- Creating telegrambotgo_db_1 ... done
- Attaching to telegrambotgo_bot_1, telegrambotgo_db_1
- bot_1 | standard_init_linux.go:195: exec user process caused "no such file or directory"
- db_1 | /usr/local/bin/docker-entrypoint.sh: line 145: exec: CREATE: not found
- telegrambotgo_bot_1 exited with code 1
- telegrambotgo_db_1 exited with code 127
- FROM alpine
- COPY /code/code /
- RUN apk add --no-cache ca-certificates &&
- chmod +x code
- EXPOSE 80/tcp
- CMD [ "./code" ]
- docker run --name db -e POSTGRES_PASSWORD=mypassword -d postgres
- docker exec -it db bash
- psql -U postgres
- CREATE TABLE users(ID SERIAL PRIMARY KEY, TIMESTAMP TIMESTAMP DEFAULT CURRENT_TIMESTAMP, USERNAME TEXT, CHAT_ID INT, MESSAGE TEXT, ANSWER TEXT);
- docker run --name bot --link db -d myapp
- host=172.17.0.2 port=5432 user=postgres password=wikitelegrambot dbname=postgres sslmode=disable
Add Comment
Please, Sign In to add comment