- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个使用 flask API、mysql 和 redis 进行 docker 化的开发环境。
当我运行“docker-compose up”时,我在 docker 终端的长日志输出末尾得到以下内容
Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
但是 API 没有加载到我的 Web 浏览器中,也没有响应来自 Postman 的请求(当我向 URL 发送任何 HTTP 请求时“无法得到响应”)。
为什么 docker 说服务器已启动并正在运行,但它实际上没有响应任何内容?
这是我的 docker-compose 文件:
version: '2.1'
services:
api:
build: .
environment:
PYTHONUNBUFFERED: 'true'
MYSQL_HOSTNAME: mysql
REDIS_URL: redis
links:
- mysql
- redis
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
ports:
- '5000:5000'
mysql:
build: ./mysql
volumes:
- /var/lib/mysql
healthcheck:
test: ["CMD", "********", "-u", "******", "********", "ping"]
interval: 2s
timeout: 1s
retries: 120
ports:
- '3306:3306'
redis:
image: "redis:3.0-alpine"
command: redis-server
volumes:
- /var/lib/redis/data
ports:
- '6379:6379'
这是 docker 文件:
FROM python:2.7
LABEL maintainer="Kento Noguchi"
ENV FLASK_ENV="dev"
ENV MYSQL_USER="root"
ENV MYSQL_PASSWORD="password"
ENV SECRET_KEY="the quick brown fox jumps over the lazy dog"
# Place app in container..
COPY . /opt/www
WORKDIR /opt/www
# Install dependencies..
RUN pip install -r requirements.txt
RUN chmod +x ./load_db.sh
EXPOSE 5000
CMD sh ./load_db.sh && python server.py runserver --threaded -p 5000
这是我运行“docker-compose up”后的输出:
$ docker-compose up
Creating network "edinlabsapi_default" with the default driver
Creating edinlabsapi_redis_1
Creating edinlabsapi_mysql_1
Creating edinlabsapi_api_1
Attaching to edinlabsapi_redis_1, edinlabsapi_mysql_1, edinlabsapi_api_1
redis_1 | 1:C 10 Oct 02:11:43.157 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
mysql_1 | Initializing database
mysql_1 | 2017-10-10T02:11:43.299048Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1 | 2017-10-10T02:11:43.440515Z 0 [Warning] InnoDB: New log files created, LSN=45790
mysql_1 | 2017-10-10T02:11:43.473964Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
mysql_1 | 2017-10-10T02:11:43.529689Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 5c4fec40-ad60-11e7-9b35-0242ac120003.
mysql_1 | 2017-10-10T02:11:43.531612Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
mysql_1 | 2017-10-10T02:11:43.531963Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
mysql_1 | 2017-10-10T02:11:43.927042Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:43.927126Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:43.927151Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:43.927239Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:43.927277Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | Database initialized
mysql_1 | Initializing certificates
mysql_1 | Generating a 2048 bit RSA private key
mysql_1 | ..................................................................................+++
mysql_1 | .....................................................................................................................+++
mysql_1 | unable to write 'random state'
mysql_1 | writing new private key to 'ca-key.pem'
mysql_1 | -----
mysql_1 | Generating a 2048 bit RSA private key
mysql_1 | ..........................................+++
mysql_1 | ...............+++
mysql_1 | unable to write 'random state'
mysql_1 | writing new private key to 'server-key.pem'
mysql_1 | -----
mysql_1 | Generating a 2048 bit RSA private key
mysql_1 | .......................................................................+++
mysql_1 | ...........................................+++
mysql_1 | unable to write 'random state'
mysql_1 | writing new private key to 'client-key.pem'
mysql_1 | -----
mysql_1 | Certificates initialized
mysql_1 | MySQL init process in progress...
mysql_1 | 2017-10-10T02:11:46.446286Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1 | 2017-10-10T02:11:46.447202Z 0 [Note] mysqld (mysqld 5.7.17) starting as process 91 ...
mysql_1 | 2017-10-10T02:11:46.449818Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql_1 | 2017-10-10T02:11:46.449870Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1 | 2017-10-10T02:11:46.449884Z 0 [Note] InnoDB: Uses event mutexes
mysql_1 | 2017-10-10T02:11:46.450000Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1 | 2017-10-10T02:11:46.450013Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
mysql_1 | 2017-10-10T02:11:46.450036Z 0 [Note] InnoDB: Using Linux native AIO
mysql_1 | 2017-10-10T02:11:46.450206Z 0 [Note] InnoDB: Number of pools: 1
mysql_1 | 2017-10-10T02:11:46.450282Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql_1 | 2017-10-10T02:11:46.451269Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql_1 | 2017-10-10T02:11:46.457881Z 0 [Note] InnoDB: Completed initialization of buffer pool
mysql_1 | 2017-10-10T02:11:46.460140Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql_1 | 2017-10-10T02:11:46.471894Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
mysql_1 | 2017-10-10T02:11:46.484684Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql_1 | 2017-10-10T02:11:46.484796Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql_1 | 2017-10-10T02:11:46.505413Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql_1 | 2017-10-10T02:11:46.507223Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
mysql_1 | 2017-10-10T02:11:46.507301Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
mysql_1 | 2017-10-10T02:11:46.507899Z 0 [Note] InnoDB: Waiting for purge to start
mysql_1 | 2017-10-10T02:11:46.558783Z 0 [Note] InnoDB: 5.7.17 started; log sequence number 2534561
mysql_1 | 2017-10-10T02:11:46.560273Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql_1 | 2017-10-10T02:11:46.567602Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
mysql_1 | 2017-10-10T02:11:46.567818Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql_1 | 2017-10-10T02:11:46.570849Z 0 [Note] InnoDB: Buffer pool(s) load completed at 171010 2:11:46
mysql_1 | 2017-10-10T02:11:46.572069Z 0 [Warning] CA certificate ca.pem is self signed.
mysql_1 | 2017-10-10T02:11:46.580538Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:46.580706Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:46.580774Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:46.580814Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:46.584210Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:46.595396Z 0 [Note] Event Scheduler: Loaded 0 events
mysql_1 | 2017-10-10T02:11:46.595634Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check.
mysql_1 | 2017-10-10T02:11:46.595676Z 0 [Note] Beginning of list of non-natively partitioned tables
mysql_1 | 2017-10-10T02:11:46.613650Z 0 [Note] End of list of non-natively partitioned tables
mysql_1 | 2017-10-10T02:11:46.613941Z 0 [Note] mysqld: ready for connections.
mysql_1 | Version: '5.7.17' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server (GPL)
mysql_1 | 2017-10-10T02:11:47.450123Z 5 [Note] Access denied for user 'root'@'localhost' (using password: YES)
mysql_1 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
mysql_1 | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
mysql_1 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
mysql_1 | 2017-10-10T02:11:49.396509Z 6 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:49.396718Z 6 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:49.396794Z 6 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:49.396820Z 6 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:49.396902Z 6 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | mysql: [Warning] Using a password on the command line interface can be insecure.
mysql_1 | mysql: [Warning] Using a password on the command line interface can be insecure.
mysql_1 | 2017-10-10T02:11:49.409488Z 8 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:49.409544Z 8 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:49.409576Z 8 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:49.409592Z 8 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:49.409716Z 8 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | mysql: [Warning] Using a password on the command line interface can be insecure.
mysql_1 |
mysql_1 | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/00_init_db.sql
mysql_1 |
mysql_1 |
mysql_1 | 2017-10-10T02:11:49.414120Z 0 [Note] Giving 0 client threads a chance to die gracefully
mysql_1 | 2017-10-10T02:11:49.414151Z 0 [Note] Shutting down slave threads
mysql_1 | 2017-10-10T02:11:49.414164Z 0 [Note] Forcefully disconnecting 0 remaining clients
mysql_1 | 2017-10-10T02:11:49.414175Z 0 [Note] Event Scheduler: Purging the queue. 0 events
mysql_1 | 2017-10-10T02:11:49.414207Z 0 [Note] Binlog end
mysql_1 | 2017-10-10T02:11:49.414706Z 0 [Note] Shutting down plugin 'ngram'
mysql_1 | 2017-10-10T02:11:49.414722Z 0 [Note] Shutting down plugin 'BLACKHOLE'
mysql_1 | 2017-10-10T02:11:49.414733Z 0 [Note] Shutting down plugin 'partition'
mysql_1 | 2017-10-10T02:11:49.414742Z 0 [Note] Shutting down plugin 'ARCHIVE'
mysql_1 | 2017-10-10T02:11:49.414750Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
mysql_1 | 2017-10-10T02:11:49.414761Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
mysql_1 | 2017-10-10T02:11:49.414770Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
mysql_1 | 2017-10-10T02:11:49.414779Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
mysql_1 | 2017-10-10T02:11:49.414797Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
mysql_1 | 2017-10-10T02:11:49.414805Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
mysql_1 | 2017-10-10T02:11:49.414813Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
mysql_1 | 2017-10-10T02:11:49.414820Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
mysql_1 | 2017-10-10T02:11:49.414828Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
mysql_1 | 2017-10-10T02:11:49.414835Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
mysql_1 | 2017-10-10T02:11:49.414896Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
mysql_1 | 2017-10-10T02:11:49.414906Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
mysql_1 | 2017-10-10T02:11:49.414914Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
mysql_1 | 2017-10-10T02:11:49.414921Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
mysql_1 | 2017-10-10T02:11:49.414929Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
mysql_1 | 2017-10-10T02:11:49.414936Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
mysql_1 | 2017-10-10T02:11:49.414944Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
mysql_1 | 2017-10-10T02:11:49.414962Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
mysql_1 | 2017-10-10T02:11:49.414970Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
mysql_1 | 2017-10-10T02:11:49.414978Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
mysql_1 | 2017-10-10T02:11:49.414986Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
mysql_1 | 2017-10-10T02:11:49.414993Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
mysql_1 | 2017-10-10T02:11:49.415001Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
mysql_1 | 2017-10-10T02:11:49.415008Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
mysql_1 | 2017-10-10T02:11:49.415016Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
mysql_1 | 2017-10-10T02:11:49.415023Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
mysql_1 | 2017-10-10T02:11:49.415031Z 0 [Note] Shutting down plugin 'INNODB_CMP'
mysql_1 | 2017-10-10T02:11:49.415038Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
mysql_1 | 2017-10-10T02:11:49.415046Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
mysql_1 | 2017-10-10T02:11:49.415053Z 0 [Note] Shutting down plugin 'INNODB_TRX'
mysql_1 | 2017-10-10T02:11:49.415061Z 0 [Note] Shutting down plugin 'InnoDB'
mysql_1 | 2017-10-10T02:11:49.415113Z 0 [Note] InnoDB: FTS optimize thread exiting.
mysql_1 | 2017-10-10T02:11:49.415278Z 0 [Note] InnoDB: Starting shutdown...
mysql_1 | 2017-10-10T02:11:49.519219Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
mysql_1 | 2017-10-10T02:11:49.531444Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 171010 2:11:49
mysql_1 | 2017-10-10T02:11:50.545809Z 0 [Note] InnoDB: Shutdown completed; log sequence number 12131606
mysql_1 | 2017-10-10T02:11:50.551245Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
mysql_1 | 2017-10-10T02:11:50.551455Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
mysql_1 | 2017-10-10T02:11:50.551499Z 0 [Note] Shutting down plugin 'MyISAM'
mysql_1 | 2017-10-10T02:11:50.551552Z 0 [Note] Shutting down plugin 'CSV'
mysql_1 | 2017-10-10T02:11:50.551585Z 0 [Note] Shutting down plugin 'MEMORY'
mysql_1 | 2017-10-10T02:11:50.551614Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
mysql_1 | 2017-10-10T02:11:50.551678Z 0 [Note] Shutting down plugin 'sha256_password'
mysql_1 | 2017-10-10T02:11:50.551712Z 0 [Note] Shutting down plugin 'mysql_native_password'
mysql_1 | 2017-10-10T02:11:50.552059Z 0 [Note] Shutting down plugin 'binlog'
mysql_1 | 2017-10-10T02:11:50.553201Z 0 [Note] mysqld: Shutdown complete
mysql_1 |
mysql_1 |
mysql_1 | MySQL init process done. Ready for start up.
mysql_1 |
mysql_1 | 2017-10-10T02:11:50.793971Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1 | 2017-10-10T02:11:50.795221Z 0 [Note] mysqld (mysqld 5.7.17) starting as process 1 ...
mysql_1 | 2017-10-10T02:11:50.798668Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql_1 | 2017-10-10T02:11:50.798749Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1 | 2017-10-10T02:11:50.798763Z 0 [Note] InnoDB: Uses event mutexes
mysql_1 | 2017-10-10T02:11:50.798774Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1 | 2017-10-10T02:11:50.798782Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
mysql_1 | 2017-10-10T02:11:50.798803Z 0 [Note] InnoDB: Using Linux native AIO
mysql_1 | 2017-10-10T02:11:50.798966Z 0 [Note] InnoDB: Number of pools: 1
mysql_1 | 2017-10-10T02:11:50.799037Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql_1 | 2017-10-10T02:11:50.800458Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql_1 | 2017-10-10T02:11:50.805895Z 0 [Note] InnoDB: Completed initialization of buffer pool
mysql_1 | 2017-10-10T02:11:50.808466Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql_1 | 2017-10-10T02:11:50.821074Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
mysql_1 | 2017-10-10T02:11:50.846882Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql_1 | 2017-10-10T02:11:50.847575Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql_1 | 2017-10-10T02:11:50.900217Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql_1 | 2017-10-10T02:11:50.901397Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
mysql_1 | 2017-10-10T02:11:50.901446Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
mysql_1 | 2017-10-10T02:11:50.901811Z 0 [Note] InnoDB: Waiting for purge to start
mysql_1 | 2017-10-10T02:11:50.952504Z 0 [Note] InnoDB: 5.7.17 started; log sequence number 12131606
mysql_1 | 2017-10-10T02:11:50.952998Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql_1 | 2017-10-10T02:11:50.960585Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
mysql_1 | 2017-10-10T02:11:50.961830Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql_1 | 2017-10-10T02:11:50.965617Z 0 [Warning] CA certificate ca.pem is self signed.
mysql_1 | 2017-10-10T02:11:50.970795Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
mysql_1 | 2017-10-10T02:11:50.976413Z 0 [Note] IPv6 is available.
mysql_1 | 2017-10-10T02:11:50.976819Z 0 [Note] - '::' resolves to '::';
mysql_1 | 2017-10-10T02:11:50.976901Z 0 [Note] Server socket created on IP: '::'.
mysql_1 | 2017-10-10T02:11:50.976300Z 0 [Note] InnoDB: Buffer pool(s) load completed at 171010 2:11:50
mysql_1 | 2017-10-10T02:11:50.985951Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:50.986136Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:50.987187Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:50.987274Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:50.995476Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1 | 2017-10-10T02:11:51.012317Z 0 [Note] Event Scheduler: Loaded 0 events
mysql_1 | 2017-10-10T02:11:51.012767Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check.
mysql_1 | 2017-10-10T02:11:51.012849Z 0 [Note] Beginning of list of non-natively partitioned tables
api_1 | /usr/local/lib/python2.7/site-packages/flask_cache/jinja2ext.py:33: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
api_1 | from flask.ext.cache import make_template_fragment_key
api_1 | Creating directory /opt/www/migrations ... done
api_1 | Creating directory /opt/www/migrations/versions ... done
api_1 | Generating /opt/www/migrations/alembic.ini ... done
api_1 | Generating /opt/www/migrations/env.py ... done
api_1 | Generating /opt/www/migrations/script.py.mako ... done
api_1 | Generating /opt/www/migrations/README ... done
api_1 | Generating /opt/www/migrations/env.pyc ... done
api_1 | Please edit configuration/connection/logging settings in '/opt/www/migrations/alembic.ini' before proceeding.
api_1 | /usr/local/lib/python2.7/site-packages/flask_cache/jinja2ext.py:33: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
api_1 | from flask.ext.cache import make_template_fragment_key
api_1 | INFO [alembic.runtime.migration] Context impl MySQLImpl.
api_1 | INFO [alembic.runtime.migration] Will assume non-transactional DDL.
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'category'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'device'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'price'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'skill'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'users'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'addresses'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'products'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'subcategory'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'subskill'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'pilots'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'product_categories'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'product_devices'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'product_prices'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'product_skills'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'product_subcategories'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'product_subskills'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'surveys'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'questions'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'questions_checkbox'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'questions_likert'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'questions_long_input'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'questions_range'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'questions_short_input'
api_1 | INFO [alembic.autogenerate.compare] Detected added table 'choices'
api_1 | Generating /opt/www/migrations/versions/4a7091cfe023_.py ... done
api_1 | /usr/local/lib/python2.7/site-packages/flask_cache/jinja2ext.py:33: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
api_1 | from flask.ext.cache import make_template_fragment_key
api_1 | INFO [alembic.runtime.migration] Context impl MySQLImpl.
api_1 | INFO [alembic.runtime.migration] Will assume non-transactional DDL.
api_1 | INFO [alembic.runtime.migration] Running upgrade -> 4a7091cfe023, empty message
api_1 | /usr/local/lib/python2.7/site-packages/flask_cache/jinja2ext.py:33: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
api_1 | from flask.ext.cache import make_template_fragment_key
api_1 | * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
api_1 | * Restarting with stat
api_1 | /usr/local/lib/python2.7/site-packages/flask_cache/jinja2ext.py:33: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
api_1 | from flask.ext.cache import make_template_fragment_key
api_1 | * Debugger is active!
最佳答案
使用 Docker quickstart Terminal 意味着您使用的是 docker 工具箱,而不是 Docker for windows。
您需要使用您的 Docker VM 的 IP 来访问这里的应用程序。
使用 docker-machine ip
获取IP然后浏览器<ip>:5000
在浏览器中
关于mysql - Flask API 在本地运行 w/docker-compose,但没有响应 (windows),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46657768/
我正在遵循Flask-potion教程并尝试保护我的api。我一直试图找出如何在User端点上设置权限,以使一个User无法查看另一个User的记录。这是我的代码: class UserResourc
项目设置 Python 3.5.3 flask 0.12.2 目录 . ├── Core │ ├── BackgroundProcessManager.py │ ├── FirebaseDat
我正在构建 flask 应用程序并决定这次尝试应用程序工厂方法,但是遇到了 flask 迁移的麻烦并且无法找出简单的解决方案。 请注意,我想将配置位置作为选项传递给脚本 管理.py: manager
我尝试通过以下示例代码来熟悉Flask-APScheduler插件:https://github.com/viniciuschiele/flask-apscheduler/blob/master/ex
我一周前刚刚了解了 Flask 和 JWT,所以我真的需要一些帮助。有人可以解释一下flask-jwt和flask-jwt-extended之间的区别吗? 最佳答案 Flask-JWT 没有那么多功能
我是 Flask 的新手,我只是想用它创建一个简单的市场。我的网站上有三种类型的用户 [卖家、买家、管理员]。我认为每种类型的用户都应该有自己的注册和登录,因为他们的角色应该提供不同类型的信息。另一方
基本上,我想做一些非常简单的事情:我想创建一个用于删除数据库中条目的表单。 模板正在创建一个包含所有条目的html表,没有任何麻烦。我现在的问题是:如何将其转换为每行都有链接的表单。 当然,我可以通过
我对Flask来说非常陌生,其中一个基本要求是我需要SEO友好的URL。 我说一条路线 @app.route('/sales/') @app.route(/sales/) def get_sales(
一直在为用户管理系统开发Flask-user,但是我看不到自定义登录页面和注册页面的方法。我使用pip安装了flask-user pip install flask-user 任何帮助,将不胜感激 最
我有一个奇怪的情况,不知道如何找到问题。 我已经创建了一个这样的蓝图 reportjobsmod = Blueprint('jobreports', __name__, url_prefix='/jo
我认为在 Flask 中拥有实例变量的正确方法是添加用户和 session ,但我正在尝试测试一个概念,我还不想经历所有这些。我试图让一个网络应用程序将图像加载到一个变量中,然后可以对其执行不同的图像
select = SelectField("City") form.select.choices = [(places['name'], places['name']) for places in p
这个问题在这里已经有了答案: Provide extra information to Flask's app.logger (2 个回答) 3年前关闭。 我正在运行一个 flask 应用程序。我想写
我当时正在编程一个非常不错的api,使用json从游戏服务器到我的网站空间获取一些json数据, 但是每次我使用angular发送请求时,我都会得到以下信息:127.0.0.1--[20 / Mar
我已经开发了一个上传表单,以将特定的.xlsx文件作为上传。要求是要处理非xlsx上载的任何异常(例如zip,exe文件)。我正在使用pyexcel库读取上传内容。我尝试创建以下代码来处理此异常: e
我使用此功能在网站上捕获404错误: @app.errorhandler(404) def page_not_found(e): logger.warning('User raised an
我正在尝试同时使用 Flask Restful 和 Flask SocketIO。我已经制作了一个 Flask Restful 应用程序,但现在我想使用 Flask SocketIO 在客户端和我的服
我有一些 Flask 应用程序,我通过设置 FLASK_APP 来运行它们。环境变量和调用 flask run .自 FLASK_DEBUG也设置了,每当我更改一些代码时,应用程序都可以方便地重新加载
我目前正在使用 Flask 构建一个应用程序。我正在努力访问 Flask 实例“app”以及 Flask-mail 实例“mail”。 下面是我的项目的样子: └── my-project ├
Remember-me是 parameter flask_login.login_user(user, remember=False, duration=None, force=False, fres
我是一名优秀的程序员,十分优秀!